Skip to content
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

[DEV] Fixed Indentation issue in the Analyzer #23

Merged
merged 1 commit into from
Mar 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 11 additions & 10 deletions triton_viz/analysis.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,16 +31,17 @@ def analyze_records():
mask_false = np.count_nonzero(np.logical_not(record.access_masks))
total_store_bytes_true += mask_true * element_size
total_store_bytes_attempted += (mask_true + mask_false) * element_size
overall_load_ratio = (
total_load_bytes_true / total_load_bytes_attempted
if total_load_bytes_attempted > 0
else 0
)
overall_store_ratio = (
total_store_bytes_true / total_store_bytes_attempted
if total_store_bytes_attempted > 0
else 0
)

overall_load_ratio = (
total_load_bytes_true / total_load_bytes_attempted
if total_load_bytes_attempted > 0
else 0
)
overall_store_ratio = (
total_store_bytes_true / total_store_bytes_attempted
if total_store_bytes_attempted > 0
else 0
)
data = [["Grid Size", tuple(grid_size)]]
data += [[op_type, count] for op_type, count in op_type_counts.items()]
data.append(["Masked Load Ratio", overall_load_ratio])
Expand Down
Loading