gpuocelot cuda12 sm 86 - #17856
Conversation
| sudo mkdir -p "$cuda_root" | ||
| for archive in \ | ||
| cuda_nvrtc-linux-x86_64-12.9.86-archive.tar.xz \ | ||
| cuda_cudart-linux-x86_64-12.9.37-archive.tar.xz; do |
There was a problem hiding this comment.
I neede to add this bc of failures like this https://github.com/li0nr/tinygrad/actions/runs/33324336717/job/99291747648,
maybe bc of this condition if (nvrtcMajor.value, nvrtcMinor.value) >= (12, 4): self.compile_options.append("--minimal")
If there is any cleaner way of doing this, I can change
| name='/usr/local/lib/libgpuocelot.${{ runner.os == 'Linux' && 'so' || 'dylib' }}', | ||
| sha256='${{ runner.os == 'Linux' && 'a24705276a9a187111371465987b3258f8836ef512a34266e3075bc4714e125a' || '5106c998c795a36dec79eb7b2aae324a93d1338236d36eeaae232649ec457663' }}').chmod(0o644)" | ||
| sudo mkdir -p /usr/local/lib | ||
| sudo curl --output-dir /usr/local/lib -fLO https://github.com/li0nr/gpuocelot/releases/download/cuda-12-support-sm86/libgpuocelot.${{ runner.os == 'Linux' && 'so' || 'dylib' }} |
There was a problem hiding this comment.
If we approve the changes to ocelot, I will change this to be more offical release ....
|
Tests passing? You need to remove those matchers from cstyle, it needs to work on 100% of SM86 PTX. |
|
yep tests are passing. the matchers are for sm86, the cuda cpp generated code is being rejected by the new nvrtc, for example : or maybe i did not understand your point. running the full test suite with sm86 with these matchers is passing. |
|
You don't need the matchers for 3090/4090/5090, what version is that? |
|
I chose the SM86 specifaclly because it matches 3090 according to this https://developer.nvidia.com/cuda/gpus. |
|
found the issue, I was not using the correct cuda_cudart, in my linux env. |
|
This branch currently is behind tinygrad/master. The line count difference bot is disabled. |
|
cleaned up and remvoed the matchers, tests are passing in both modes: |
| return orig_cuda.CUDA_ERROR_INVALID_VALUE | ||
| device._obj.value = ordinal | ||
| cuda_state.devices[ordinal] = {"compute_capability": (3, 5)} | ||
| cuda_state.devices[ordinal] = {"compute_capability": (8, 6)} |
There was a problem hiding this comment.
can this work the same way MOCK+AMD::<arch> does?
There was a problem hiding this comment.
something like this ?
gpu_arch = int(MOCKGPU_ARCH[3:])
cuda_state.devices[ordinal] = {"compute_capability": divmod(gpu_arch, 10)}i have added a commit
|
Are you confident the GPUOcelot port is complete, or did you just target making the tests pass? |
|
Bounty locked to you, let's get this merged first. tinygrad/gpuocelot#12 |
|
So my apprach was running tinygrad with the ocelot and list all the stuff we needed to support. |
|
We need everything in sm86! tinygrad may change and we need an emulator we can rely on |
This PR uses the GPUOcelot CUDA 12 sm86 release (which is the main change), adds CUDA 12 NVRTC/runtime header setup.
Gpuocelot add support to cuda12 and sm_50 and sm_86.
at the beginng i just wanted for gpuocelot to run with cuda-12 with minimal arch support sm_50.
Changes where small we can see it in this branch https://github.com/li0nr/tinygrad/commits/gpuocelot-cuda-12.
if it is safer we can go this route.
The next best thing (to be bounty worthy) was supporting sm_86 arch in gpuocelot.
this needs to be modfied after we merge the ocelot branch to the tinygrad repo.
tinygrad/gpuocelot#12 / https://github.com/li0nr/gpuocelot/tree/cuda-12-sm86
CI: li0nr#2