Skip to content

Commit

Permalink
Move to CPU before attempting to convert to numpy. (#922)
Browse files Browse the repository at this point in the history
  • Loading branch information
iantbutler01 authored Jan 8, 2024
1 parent 4870580 commit d05b508
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bitsandbytes/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def unpack_tensor_to_dict(tensor_data):
Returns:
A Python dictionary containing the unpacked data.
"""
json_bytes = bytes(tensor_data.numpy())
json_bytes = bytes(tensor_data.cpu().numpy())
json_str = json_bytes.decode('utf-8')
unpacked_dict = json.loads(json_str)

Expand Down

0 comments on commit d05b508

Please sign in to comment.