-
Notifications
You must be signed in to change notification settings - Fork 886
bugfix: fix claude skills #2275
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
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
5 changes: 5 additions & 0 deletions
5
.claude/skills/benchmark-kernel/skill.md β .claude/skills/benchmark-kernel/SKILL.md
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
5 changes: 5 additions & 0 deletions
5
.claude/skills/debug-cuda-crash/skill.md β .claude/skills/debug-cuda-crash/SKILL.md
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
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.
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.
The example benchmark script has a few issues that would prevent it from running correctly:
numpy, which is needed to calculatenp.medianandnp.std.bench_gpu_timefunction returns a list of execution times in milliseconds, not the median and standard deviation directly. The example code should be updated to calculate these statistics from the returned list.us) should be from milliseconds, so the multiplication factor should be1000, not1e6(which would be for seconds-to-microseconds).Here is a corrected version of the script.
import torch import numpy as np from flashinfer.testing import bench_gpu_time def bench_scale(): """Benchmark scale kernel.""" import flashinfer sizes = [1024, 4096, 16384, 65536, 262144] dtypes = [torch.float16, torch.bfloat16] print("Scale Kernel Benchmark") print("-" * 60) print(f"{'Size':>10} {'Dtype':>10} {'Time (us)':>12} {'Std (us)':>10}") print("-" * 60) for size in sizes: for dtype in dtypes: x = torch.randn(size, dtype=dtype, device="cuda") # Benchmark with CUPTI (auto-fallback to CUDA events) times_ms = bench_gpu_time( flashinfer.scale, args=(x, 2.0), enable_cupti=True, dry_run_iters=10, repeat_iters=100, ) # bench_gpu_time returns a list of times in milliseconds median_time_us = np.median(times_ms) * 1000 std_time_us = np.std(times_ms) * 1000 print(f"{size:>10} {str(dtype):>10} {median_time_us:>12.2f} {std_time_us:>10.2f}") if __name__ == "__main__": bench_scale()