Skip to content

B-listDeveloper/vkllm.c

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

vkllm.c

A reproduction of llm.c by @karpathy using Vulkan compute shaders.

Prerequisite

Install vulkan-sdk following https://vulkan.lunarg.com/sdk/home#linux.

wget -qO - https://packages.lunarg.com/lunarg-signing-key-pub.asc | sudo apt-key add -
sudo wget -qO /etc/apt/sources.list.d/lunarg-vulkan-{RELEASE}-{CODENAME}.list https://packages.lunarg.com/vulkan/{RELEASE}/lunarg-vulkan-{RELEASE}-{CODENAME}.list
sudo apt update
sudo apt install vulkan-sdk

And don't forget to install GPU driver.

Usage

I only added a few layers for now, and you can test those by running bazel rules like:

bazel run :matmul_forward -- 1

Notes

If you see llvmpipe in stdout when running, your GPU is not being used correctly.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors