mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/18362 ghimport-source-id: 374b7ab97e2d6a894368007133201f510539296f Stack from [ghstack](https://github.com/ezyang/ghstack): * #18242 Test running a CUDA build on CPU machine. * **#18362 Add ability to query if built with CUDA and MKL-DNN.** Fixes #18108. Signed-off-by: Edward Z. Yang <ezyang@fb.com> Differential Revision: D14584430 fbshipit-source-id: 7605a1ac4e8f2a7c70d52e5a43ad7f03f0457473
7 lines
132 B
Python
7 lines
132 B
Python
import torch
|
|
|
|
|
|
def is_available():
|
|
r"""Returns whether PyTorch is built with MKL-DNN support."""
|
|
return torch._C.has_mkldnn
|