-
Notifications
You must be signed in to change notification settings - Fork 9.9k
modeld: autodetect tinygrad backend #35405
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
modeld: autodetect tinygrad backend #35405
Conversation
trigger-jenkins |
This PR has had no activity for 9 days. It will be automatically closed in 2 days if there is no activity. |
This PR has been automatically closed due to inactivity. Feel free to re-open once activity resumes. |
This PR has had no activity for 9 days. It will be automatically closed in 2 days if there is no activity. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's restrict the tinygrad backend types
This reverts commit 0e9755f.
Co-authored-by: Adeeb Shihadeh <[email protected]>
d4c46ba
to
17ea215
Compare
17ea215
to
5accb2b
Compare
if not TICI: | ||
backend = backend_from_jit(self.model_run) | ||
os.environ[backend] = '1' | ||
cloudlog.warning(f"dmonitoringmodeld backend set to {backend}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this feels like it should be an upstream tinygrad PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
more like the backend should be exposed as a parameter self.model_run.backend
?
or the model/jit should run or fallback to the device it was compiled for?
opened a tinygrad issue: tinygrad/tinygrad#10989
This PR has had no activity for 9 days. It will be automatically closed in 2 days if there is no activity. |
Should be good to go after rebasing |
95eac21
to
aa47705
Compare
trigger-jenkins |
Breaks scons compilation for me
|
@sshane can you please paste the output of:
I will make the next PR always fallback to CPU, when the detected backend fails for any reason. |
|
@sshane can you also paste for?
I’m interested in the CUDA info/version. last one. thanks 🙏 |
|
PR does the following:
llvm@19
instead of llvm, since current latest llvm (20) isn't detected as a device by tinygrad and also installs python 3.13 as a dependency (current tinygrad uses llvm@19)the reason I didn't detect the devices (again) at runtime is because
Device.get_available_devices()
takes between 0.9 sec to 1.4 sec (on my M1 mac), thus delaying the start ofmodeld
anddmonitoringmodeld
.