Commit a56f63a
authored
Specify device for codebook indices creation (NVIDIA-NeMo#15405)
Bug: torch.arange always creates a tensor on cpu, but the FSQ might be moved to another device, crashing codes function when called (because of self.decode function: indices//self.dim_base_index...)
Fix: just move to device when creating tensor.
Signed-off-by: Ferdydh <ferdydh.hadiwijaya@tum.de>1 parent 412706f commit a56f63a
1 file changed
+1
-1
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1256 | 1256 | | |
1257 | 1257 | | |
1258 | 1258 | | |
1259 | | - | |
| 1259 | + | |
1260 | 1260 | | |
1261 | 1261 | | |
1262 | 1262 | | |
| |||
0 commit comments