mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-21 05:34:18 +08:00
`torch/csrc/utils.h` should be device-independent. Currently, it contains CUDA-related implementations, which indirectly causes the [failure of ROCm testing](https://github.com/pytorch/pytorch/pull/151914#issuecomment-2839691038) (The reason is that the ROCm test environment shouldn`t expose HIP-related header files, which causes the JIT compilation to fail during testing) Therefore, move CUDA-related implementations to `torch/csrc/cuda/utils.h`. **Question:** This change may introduce BC-breack. I searched for this function globally on github and I think the impact is very small. Pull Request resolved: https://github.com/pytorch/pytorch/pull/152521 Approved by: https://github.com/Skylion007, https://github.com/albanD ghstack dependencies: #152512, #152513
10 lines
215 B
C++
10 lines
215 B
C++
#pragma once
|
|
|
|
#include <c10/cuda/CUDAStream.h>
|
|
#include <torch/csrc/utils/python_numbers.h>
|
|
|
|
#include <vector>
|
|
|
|
std::vector<std::optional<at::cuda::CUDAStream>>
|
|
THPUtils_PySequence_to_CUDAStreamList(PyObject* obj);
|