Skip to content

Commit

Permalink
Fix bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
xuzhao9 committed Jan 9, 2025
1 parent 2a9d900 commit 53b39ee
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
5 changes: 3 additions & 2 deletions benchmarks/nightly/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -66,9 +66,10 @@ def run():
op_args = OPERATORS[op]
output_file = output_dir.joinpath(f"{op}.csv")
op_args.extend(["--output", str(output_file.absolute())])
op = op_task.make_operator_instance(op_args)
op.run()
op_task.make_operator_instance(op_args)
op_task.run()
output_files.append(output_file)
del op_task
# Reduce all operator CSV outputs to a single output json
result_json_file = reduce(output_files)

Expand Down
6 changes: 3 additions & 3 deletions tritonbench/components/compile_time/trace.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
from typing import Callable, Dict

import torch
from triton.fb.triton_util import triton_add_listener, TritonHook
from tritonbench.utils.env_utils import fresh_triton_cache

from tritonbench.utils.env_utils import fresh_triton_cache, is_fbcode
if is_fbcode():
from triton.fb.triton_util import triton_add_listener, TritonHook

def fbcode_do_compile_time_in_task(fn: Callable) -> Dict[str, float]:
# not yet getting results that make sense to me
Expand Down
4 changes: 4 additions & 0 deletions tritonbench/utils/env_utils.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
"""
Utils for checking and modifying the environment.
Requires PyTorch
"""

import logging
Expand Down Expand Up @@ -30,6 +31,9 @@
]


def is_fbcode() -> bool:
return not hasattr(torch.version, "git_version")

def is_cuda() -> bool:
return torch.version.cuda is not None

Expand Down

0 comments on commit 53b39ee

Please sign in to comment.