Skip to content
Open
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
5 changes: 4 additions & 1 deletion bitsandbytes/backends/cuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,10 @@ def transform(
if HIP_ENVIRONMENT:
# transform kernel formats (col32/col_turing/col_ampere) are not applicable to ROCm
# Use nvidia_transform instead
return nvidia_transform(A, to_order, from_order, out, transpose, state, ld)
prev_device = pre_call(A.device)
out, new_state = nvidia_transform(A, to_order, from_order, out, transpose, state, ld)
post_call(prev_device)
return out, new_state

prev_device = pre_call(A.device)
if state is None:
Expand Down
Loading