All Projects → krh → Ksim

krh / Ksim

The little simulator that could.

Programming Languages

c
50402 projects - #5 most used programming language

Projects that are alternatives of or similar to Ksim

Wheels
Performance-optimized wheels for TensorFlow (SSE, AVX, FMA, XLA, MPI)
Stars: ✭ 891 (+8000%)
Mutual labels:  gpu, avx2
Plotoptix
Data visualisation in Python based on OptiX 7.2 ray tracing framework.
Stars: ✭ 252 (+2190.91%)
Mutual labels:  3d-graphics, gpu
Hybridizer Basic Samples
Examples of C# code compiled to GPU by hybridizer
Stars: ✭ 186 (+1590.91%)
Mutual labels:  gpu, avx2
Vkquake2
id Software's Quake 2 v3.21 with mission packs and Vulkan support (Windows, Linux, MacOS, FreeBSD, Raspberry Pi 4)
Stars: ✭ 543 (+4836.36%)
Mutual labels:  3d-graphics, gpu
Vkquake
Vulkan Quake port based on QuakeSpasm
Stars: ✭ 955 (+8581.82%)
Mutual labels:  3d-graphics, gpu
Dungeontemplatelibrary
🌏: Dungeon free resources (terrain & roguelike generation)
Stars: ✭ 595 (+5309.09%)
Mutual labels:  3d-graphics, simulator
Jetsonjs
Embed a JavaScript/WebGL application on a Nvidia Jetson TX2 and stream the results through websockets. It does not rely on CUDA/Jetpack. HDMI touchscreen, virtual keyboard, GPIO control, wifi config are included.
Stars: ✭ 18 (+63.64%)
Mutual labels:  gpu
Rubber Ducky Library For Arduino
An Arduino library that allows you to use a cheap Arduino (Leonardo) as a Rubber Ducky
Stars: ✭ 25 (+127.27%)
Mutual labels:  simulator
Syscrack
Virtual Online Crime Simulator (VOCS) written in PHP 7.0
Stars: ✭ 17 (+54.55%)
Mutual labels:  simulator
Tensorflow.jl
A Julia wrapper for TensorFlow
Stars: ✭ 822 (+7372.73%)
Mutual labels:  gpu
Directxmath
DirectXMath is an all inline SIMD C++ linear algebra library for use in games and graphics apps
Stars: ✭ 859 (+7709.09%)
Mutual labels:  avx2
Gpusorting
Implementation of a few sorting algorithms in OpenCL
Stars: ✭ 9 (-18.18%)
Mutual labels:  gpu
Tenyr
Simple, orthogonal 32-bit computer architecture and environment
Stars: ✭ 24 (+118.18%)
Mutual labels:  simulator
Embree viewer
Embree viewer is a simple implementation of a progressive renderer, based on Intel's Embree raytracing kernels. Its UI is written in SDL2, and it supports Alembic, OBJ file formats, with a JSON file to describe a scene.
Stars: ✭ 19 (+72.73%)
Mutual labels:  3d-graphics
Earth Defender
🚀 A distributed soft real-time 3D single/multiplayer game build with Erlang/OTP and Three.js
Stars: ✭ 7 (-36.36%)
Mutual labels:  3d-graphics
Pytorch Forecasting
Time series forecasting with PyTorch
Stars: ✭ 849 (+7618.18%)
Mutual labels:  gpu
Turbotransformers
a fast and user-friendly runtime for transformer inference (Bert, Albert, GPT2, Decoders, etc) on CPU and GPU.
Stars: ✭ 826 (+7409.09%)
Mutual labels:  gpu
Neanderthal
Fast Clojure Matrix Library
Stars: ✭ 927 (+8327.27%)
Mutual labels:  gpu
Sesc
Unofficial clone of SESC. Builds with modern C++ compilers.
Stars: ✭ 8 (-27.27%)
Mutual labels:  simulator
Fieldplay
A vector field explorer
Stars: ✭ 922 (+8281.82%)
Mutual labels:  gpu

ksim

The little simulator that could.

ksim is a simulator for Intel Skylake GPUs. It grew out of two tools I wrote a while back for capturing and decoding the output of the Intel open source drivers. Once you're capturing and decoding the command stream output by the driver it's a small step to start interpreting the stream. Initially, it was exciting to see it fetch vertices, but it has now snowballed into a fairly competent and efficient software rasterizer. As of March 22nd, ksim runs all major GL/Vulkan shader stages (vertex, hull, domain, geometry and fragment shaders) as well as compute shaders. It JIT compiles the Intel GPU ISA to AVX2 code on-the-fly using its own IR and compiler.

ksim is far from complete and probably never will be. It was never intended to be useful but it's been, and continue to be, a fun and educational project. That said, many half-baked parts of ksim are falling into place and functionality I thought I'd never enable is now running. One day it might be useful as a way to provide a simulated GPU for Qemu or, together with the Intel open source Vulkan driver, a Vulkan software rasterizer.

Building and running

ksim uses the meson build system so after cloning the repo building it boils down to:

$ mkdir build
$ meson . build --buildtype=release
$ ninja -C build
$ sudo ninja -C build install

This sets up a meson release build, which is going build a much faster ksim, but for debugging you'll want --buildtype=debug. On Fedora, the ninja tool is called ninja-build.

Once installed, it's easy to launch any GL or Vulkan application under ksim:

$ ksim glxgears

will bring up the old gears running on ksim. Since ksim simulates the GPU from the kernel level down, it can also run Vulkan applications. Some of the demos [email protected] Willems vulkan demos run and look mostly right.

The ksim executable is a small shell script that sets up LD_PRELOAD so as to load the ksim shared object into the application and then launches the application. It follows the convention of similar launchers:

$ ksim [ksim args] [--] application [application args]

The ksim args may change on a whim, but typically you can pass --trace=FLAGS, with FLAGS being something like avx,gs,gem which makes ksim print a lot of info about the given topics.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].