mirror of
https://github.com/saymrwulf/pytorch.git
synced 2026-05-14 20:57:59 +00:00
Follows #127727 Pull Request resolved: https://github.com/pytorch/pytorch/pull/127764 Approved by: https://github.com/Skylion007
13 lines
170 B
C++
13 lines
170 B
C++
#pragma once
|
|
|
|
namespace torch::utils {
|
|
|
|
inline constexpr bool cuda_enabled() {
|
|
#ifdef USE_CUDA
|
|
return true;
|
|
#else
|
|
return false;
|
|
#endif
|
|
}
|
|
|
|
} // namespace torch::utils
|