summaryrefslogtreecommitdiff
path: root/torch/backends
diff options
context:
space:
mode:
authorTongzhou Wang <SsnL@users.noreply.github.com>2018-03-19 15:43:14 -0400
committerEdward Z. Yang <ezyang@mit.edu>2018-03-19 15:43:14 -0400
commit22ef8e5654c45d1f5404e3add6ad19678c0b80a9 (patch)
tree6aa4a5826f2099c42fba81b8cbb38de0cb80238f /torch/backends
parentd11b7fbd1c49ed7bd84c89d286e2763e6ba55f51 (diff)
downloadpytorch-22ef8e5654c45d1f5404e3add6ad19678c0b80a9.tar.gz
pytorch-22ef8e5654c45d1f5404e3add6ad19678c0b80a9.tar.bz2
pytorch-22ef8e5654c45d1f5404e3add6ad19678c0b80a9.zip
[fft][1 of 3] build system and helpers to support cuFFT and MKL (#5855)
This is the first of three PRs that #5537 will be split into. This PR adds mkl headers to included files, and provides helper functions for MKL fft and cuFFT. In particular, on POSIX, headers are using mkl-include from conda, and on Windows, it is from a new file @yf225 and I made and uploaded to s3. * add mkl-include to required packages * include MKL headers; add AT_MKL_ENABLED flag; add a method to query MKL availability * Add MKL and CUFFT helpers
Diffstat (limited to 'torch/backends')
-rw-r--r--torch/backends/mkl/__init__.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/torch/backends/mkl/__init__.py b/torch/backends/mkl/__init__.py
new file mode 100644
index 0000000000..f3d27d1fa0
--- /dev/null
+++ b/torch/backends/mkl/__init__.py
@@ -0,0 +1,6 @@
+import torch
+
+
+def is_available():
+ r"""Returns whether PyTorch is built with MKL support."""
+ return torch._C.has_mkl