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

Added missing set_device calls for nvidia_transform #52

Open
wants to merge 1 commit into
base: rocm_enabled_multi_backend
Choose a base branch
from
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