Conversation
|
The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update. |
24 tasks
danieldk
reviewed
Jan 28, 2026
danieldk
previously approved these changes
Jan 29, 2026
kernels/src/kernels/benchmark.py
Outdated
Comment on lines
408
to
416
| def get_device() -> str: | ||
| if TORCH_AVAILABLE: | ||
| if torch.cuda.is_available(): | ||
| return "cuda" | ||
| elif hasattr(torch, "xpu") and torch.xpu.is_available(): | ||
| return "xpu" | ||
| elif hasattr(torch.backends, "mps") and torch.backends.mps.is_available(): | ||
| return "mps" | ||
| return "cpu" |
Member
There was a problem hiding this comment.
I think we can reuse this function:
kernels/kernels/src/kernels/utils.py
Line 50 in 3ce9687
But we can do that in a follow-up PR.
Collaborator
Author
There was a problem hiding this comment.
oh great point, just took a look and updated in this PR!
danieldk
approved these changes
Jan 29, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pr includes two changes
deviceto theBenchmarkclass so the benchmark runner can pass the detected device into the benchmark scripts. It also allows overriding this value within a benchmark script similar toseedtabulateas a optional dependency for benchmarks to avoid the hacky box drawing logic.