python3Packages.tinygrad: init at 0.8.0#287914
Conversation
ff68602 to
165bf48
Compare
|
Just noting here for future reference, but |
There was a problem hiding this comment.
This isn't quite true, since a lot of the tests can be run with a different backend, like "CLANG", "LLVM", or "CPU"
There was a problem hiding this comment.
There was a problem hiding this comment.
Oh my bad read package name wrong, thought this was in tinygrad
There was a problem hiding this comment.
But the compilation tests should still be possible to run since they should not need a GPU to be present: https://github.com/tinygrad/gpuctypes/blob/c4c4394239dce4d4ecfe7016ca268c49cb2d02a4/test/test_hip.py#L19
There was a problem hiding this comment.
We tried to run the OpenCL ones but got runtime error... Do you think that test_hip.py has better chances ?
There was a problem hiding this comment.
The opencl ones do require a device but hip and cuda, not the hipdevice or cudadevice tests should be runnable
There was a problem hiding this comment.
This makes some remote sense maybe. Doesn't OpenCL use the runtime driver to compile the device code, like opengl does?
There was a problem hiding this comment.
After blackmagic-patching, @SomeoneSerge and I were able to run the compilation tests for HIP and CUDA !
|
Result of 6 packages built:
|
165bf48 to
820a826
Compare
|
Result of 6 packages built:
|
There was a problem hiding this comment.
One more thought: this is likely going to break with rocmPackages_6, and this also means this patch doesn't account for the possibility of .override { rocmPackages = somethingElse; }. The failure isn't going to be silent (we know the tests fail unless the symbol is found) so that's enough to get started
There was a problem hiding this comment.
@NixOS/rocm-maintainers could you actually please test this? We've no idea if this works. We could mark this as broken = rocmSupport but then we'll most likely never find out if it works because nobody would care to override and test it...
There was a problem hiding this comment.
I've ran into issues with just patching it like this, the patch is slightly more complicated since the hipDeviceProp_t struct changes between rocm 5 and rocm 6, which is why they have the R0600 suffix. I've patched it by just adding the autogenned struct from rocm 5 and replacing hipDeviceProp_tR0600 with hipDeviceProp_t
There was a problem hiding this comment.
@wozeparrot so does something need to be changed? By the way, if you've got access to amd hardware, could you maybe run the tests?
There was a problem hiding this comment.
Currently I'm running this patch: https://github.com/wozeparrot/tinygrad-nix/blob/main/hip.patch, but this is against tinygrad master where gpuctypes is no longer used but the patch should apply to gpuctypes as well.
By the way, if you've got access to amd hardware, could you maybe run the tests?
Yea I can give running the tests a try.
0037c48 to
df30f9e
Compare
There was a problem hiding this comment.
Now we can disable the tests conditionally on whether a GPU is available in the sandbox:
https://gist.github.com/GaetanLepage/5cbaefd048c13626eb2eacf567809e49
Based on: #256230
There was a problem hiding this comment.
A note for future: for small, compact, and reusable things like MNIST, maybe would could actually add a FOD. If we ever do, we probably want to expose it somewhere as an attribute so we can use it other derivations. A subject for a separate discussion really
|
@ofborg build python3Packages.tinygrad |
|
Result of 2 packages failed to build:
4 packages built:
|
|
Result of 6 packages built:
|
There was a problem hiding this comment.
> Executing pythonRuntimeDepsCheck
> Checking runtime dependencies for tinygrad-0.8.0-py3-none-any.whl
> - pyobjc-framework-metal not installed
> - pyobjc-framework-libdispatch not installed
For full logs, run 'nix log /nix/store/yzz6r1irlh2l783y8wq6jdbpri3j387q-python3.11-tinygrad-0.8.0.drv'.
aarch64-darwin https://logs.ofborg.org/?key=nixos/nixpkgs.287914&attempt_id=1be6809e-6aa0-4d50-acce-e1e3616654a8
|
Result of 6 packages built:
|
|
@ofborg eval |
Co-authored-by: SomeoneSerge <sergei.kozlukov@aalto.fi>
Co-authored-by: matthewcroughan <matt@croughan.sh>
|
To sum up:
|

Description of changes
Add tinygrad, a simple and powerful neural network framework.
cc @SomeoneSerge @MatthewCroughan @wozeparrot
Things done
nix.conf? (See Nix manual)sandbox = relaxedsandbox = truenix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage./result/bin/)Add a 👍 reaction to pull requests you find important.