⚡️ Enable training with CUDA
PR implementing the feature suggested in #58. The integer matmul operation needed for a masked autoregressive transform should be explicitly carried out on CPU and then migrated to the current default device. All other tensors get created on the default device anyway. This way, if the user calls `torch.set_default_device('cuda')`, that preference will be followed.
I have modified existing tests to make sure that no existing code should be broken by my modification; all tests are now performed on CPU and with CUDA to be sure they pass either way.
合并状态:未合并 关闭于 2024-11-24 2 条评论