Skip to content

Commit

Permalink
Change how we detect device
Browse files Browse the repository at this point in the history
  • Loading branch information
xuzhao9 committed Nov 29, 2024
1 parent e8e20f6 commit e4985e2
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tritonbench/kernels/triton_fused_attention_vanilla.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,9 @@


def is_hip():
return triton.runtime.driver.active.get_current_target().backend == "hip"
# use pytorch to detect current device
# return triton.runtime.driver.active.get_current_target().backend == "hip"
return bool(torch.version.hip)


@triton.jit
Expand Down

0 comments on commit e4985e2

Please sign in to comment.