mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 00:21:07 +01:00
Let's have some fun. Pull Request resolved: https://github.com/pytorch/pytorch/pull/78828 Approved by: https://github.com/ezyang
16 lines
192 B
C++
16 lines
192 B
C++
#pragma once
|
|
|
|
namespace torch {
|
|
namespace utils {
|
|
|
|
static inline bool cuda_enabled() {
|
|
#ifdef USE_CUDA
|
|
return true;
|
|
#else
|
|
return false;
|
|
#endif
|
|
}
|
|
|
|
} // namespace utils
|
|
} // namespace torch
|