Skip to content

Commit

Permalink
tritonbench CI fialure because of OSS chagnes
Browse files Browse the repository at this point in the history
Summary: OSS change in triton impacted the  inputs to the AST class so changing this to reflect the ustream change. Did not break internally

Reviewed By: xuzhao9

Differential Revision: D67059615

fbshipit-source-id: 9329924c8da7890ecfd25533e6ac90f91737f544
  • Loading branch information
adamomainz authored and facebook-github-bot committed Dec 11, 2024
1 parent 0fe5493 commit e20a1df
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tritonbench/utils/triton_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -904,7 +904,7 @@ def run_and_capture_jit(self, *args, **kwargs):
return None

def kernel_hash(self, fn):
AST = triton.compiler.ASTSource(fn=fn, signature={}, constants={})
AST = triton.compiler.ASTSource(fn=fn, signature={})
sorted_sig = [v for k, v in sorted(AST.signature.items())]
key = f"{AST.attrs.hash()}-{sorted_sig}"
hashed = hashlib.sha256(key.encode("utf-8")).hexdigest()
Expand Down Expand Up @@ -1200,7 +1200,7 @@ def _init_extra_metrics() -> Dict[str, Any]:
metrics.best_config = self.best_config(fn)
if "all_configs" in self.required_metrics:
metrics.all_configs = self.all_configs(fn)
if "kernel_source_hash" in self.required_metrics or "gemm" in self.name:
if "kernel_source_hash" in self.required_metrics:
metrics.kernel_source_hash = self.kernel_hash(fn)
# run the hidden metric "_compile_time_in_task"
# to get the compile time in parent process
Expand Down

0 comments on commit e20a1df

Please sign in to comment.