3 #include "caffe2/core/common.h" 10 std::atomic<bool> g_caffe2_has_cuda_linked{
false};
11 std::atomic<bool> g_caffe2_has_hip_linked{
false};
13 bool HasCudaRuntime() {
14 return g_caffe2_has_cuda_linked.load();
17 bool HasHipRuntime() {
18 return g_caffe2_has_hip_linked.load();
22 void SetCudaRuntimeFlag() {
23 g_caffe2_has_cuda_linked.store(
true);
26 void SetHipRuntimeFlag() {
27 g_caffe2_has_hip_linked.store(
true);
31 const std::map<string, string>& GetBuildOptions() {
32 #ifndef CAFFE2_BUILD_STRINGS 33 #define CAFFE2_BUILD_STRINGS {} 35 static const std::map<string, string> kMap = CAFFE2_BUILD_STRINGS;
A global dictionary that holds information about what Caffe2 modules have been loaded in the current ...