intel / torch-xpu-ops

Apache License 2.0
30 stars 21 forks source link

Add tests for aten::record_stream #1058

Closed Kanya-Mo closed 1 week ago

Kanya-Mo commented 2 weeks ago

Currently there's no available UT in pytorch to test record_stream. These two tests are adapted from corresponding cuda tests. The only difference is I use an actual expensive kernel in place of torch.cuda._sleep to create delay in one stream. The add kernel here would create sufficient delay based on max memory bandwidth among current supported gpus.

xytintel commented 2 weeks ago

@Kanya-Mo Pls move src/ATen/native/xpu/sycl/RecordStream.cpp to src/ATen/native/xpu/RecordStream.cpp

Kanya-Mo commented 2 weeks ago

@Kanya-Mo Pls move src/ATen/native/xpu/sycl/RecordStream.cpp to src/ATen/native/xpu/RecordStream.cpp

Moved