Skip to content

Commit

Permalink
Merge branch 'main' of github.com:Tractables/pyjuice into main
Browse files Browse the repository at this point in the history
  • Loading branch information
liuanji committed Aug 22, 2024
2 parents b4ec465 + 679708d commit ec59bd4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/pyjuice/model/tensorcircuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -735,7 +735,7 @@ def _init_buffer(self, name: str, shape: Tuple, set_value: Optional[float] = Non
if not flag and tensor.size(i) != d:
flag = True

if not flag and check_device and tensor.device != self.device:
if not flag and check_device and self.device.index is not None and tensor.device != self.device:
flag = True

if flag:
Expand Down

0 comments on commit ec59bd4

Please sign in to comment.