…… AssertionError: Torch not compiled with CUDA enabled
NPU未使用NPU的流同步方法。
使用NPU的流同步方法:
stream = torch_npu.npu.current_stream() stream.synchronize()