-
Notifications
You must be signed in to change notification settings - Fork 45
Add triton to kernel bench #18
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
Closed
Closed
Changes from all commits
Commits
Show all changes
11 commits
Select commit
Hold shift + click to select a range
75d28eb
Add triton to kernel bench
PaliC ec273d7
add triton
PaliC 4b38254
add triton
PaliC 175d0b4
add triton
PaliC 0e78845
fix cleanup
PaliC b142003
Discard changes to src/dataset.py
PaliC 044820b
fix nits
PaliC 6eace11
fix nits
PaliC 707bb49
update main branch changes
simonguozirui e1ca73a
run through end to end triton flow for 1 sample
simonguozirui 9649251
add local server (openai) support
simonguozirui 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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
import json, os | ||
|
||
""" | ||
Analyze the greedy eval results for a run of a particular level | ||
""" | ||
from src.dataset import construct_kernelbench_dataset | ||
|
||
run_name = "test_hf_level_1" # Replace this with your run name | ||
level = 1 # change if needed | ||
|
||
dataset = construct_kernelbench_dataset(level) | ||
|
||
|
||
# load json | ||
eval_file_path = f"runs/{run_name}/eval_results.json" | ||
assert os.path.exists(eval_file_path), f"Eval file does not exist at {eval_file_path}" | ||
|
||
|
||
with open(eval_file_path, "r") as f: | ||
eval_results = json.load(f) | ||
|
||
|
||
# Initialize counters | ||
total_count = len(dataset) | ||
total_eval = len(eval_results) | ||
compiled_count = 0 | ||
correct_count = 0 | ||
|
||
# Count results | ||
for entry in eval_results.values(): | ||
if entry["compiled"] == True: | ||
compiled_count += 1 | ||
if entry["correctness"] == True: | ||
correct_count += 1 | ||
|
||
# Print results | ||
print("-" * 128) | ||
print(f"Eval Summary for {run_name}") | ||
print("-" * 128) | ||
print(f"Total test cases with Eval Results: {total_eval} out of {total_count}") | ||
print(f"Successfully compiled: {compiled_count}") | ||
print(f"Functionally correct: {correct_count}") | ||
|
||
print(f"\nSuccess rates:") | ||
print(f"Compilation rate: {compiled_count/total_count*100:.1f}%") | ||
print(f"Correctness rate: {correct_count/total_count*100:.1f}%") |
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.