mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +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
9 lines
223 B
C
9 lines
223 B
C
#pragma once
|
|
|
|
#include <torch/csrc/THP.h>
|
|
#include <torch/csrc/cuda/Event.h>
|
|
#include <torch/csrc/cuda/Module.h>
|
|
#include <torch/csrc/cuda/Stream.h>
|
|
#include <torch/csrc/cuda/utils.h>
|
|
#include <torch/csrc/python_headers.h>
|