Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions caffe2/python/_import_c_extension.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ class Annotation:
is_asan: bool
has_mkldnn: bool
use_mkldnn: bool
has_fbgemm: bool
use_rocm: bool
use_trt: bool
define_caffe2_no_operator_schema: bool
Expand Down
7 changes: 7 additions & 0 deletions caffe2/python/pybind_state.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,13 @@ void addObjectMethods(py::module& m) {

void addGlobalMethods(py::module& m) {
m.attr("is_asan") = py::bool_(C10_ASAN_ENABLED);
m.attr("has_fbgemm") = py::bool_(
#ifdef USE_FBGEMM
true
#else
false
#endif
);
m.def("get_build_options", []() { return GetBuildOptions(); });

// The old mkl backend has been removed permanently, but we
Expand Down
1 change: 1 addition & 0 deletions caffe2/python/workspace.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
operator_tracebacks = defaultdict(dict)

is_asan = C.is_asan
has_fbgemm = C.has_fbgemm
has_cuda_support = C.has_cuda_support
has_hip_support = C.has_hip_support
has_gpu_support = C.has_gpu_support
Expand Down