mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fix more MKL build issues
Summary: Turns out that due to the cmake improvement by lukeyeager , we now no longer rely on compiler flags but on the macros.h file to obtain CAFFE2_USE_MKL. This requires some minor changes in the MKL implementation to properly capture the macro before testing it. Closes https://github.com/caffe2/caffe2/pull/1124 Reviewed By: jerryzh168 Differential Revision: D5705134 Pulled By: Yangqing fbshipit-source-id: 6f6ad820cdd826818c12cf5aa344533a9324dbe2
This commit is contained in:
committed by
Facebook Github Bot
parent
a2a033937b
commit
3b903e8c68
@ -1,6 +1,9 @@
|
||||
#include "caffe2/core/common.h"
|
||||
|
||||
#ifdef CAFFE2_USE_MKL
|
||||
#include <mkl.h>
|
||||
#endif
|
||||
|
||||
#include "caffe2/core/context.h"
|
||||
#include "caffe2/core/logging.h"
|
||||
#include "caffe2/core/operator.h"
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include "caffe2/core/common.h"
|
||||
|
||||
#ifdef _OPENMP
|
||||
#include "caffe2/core/common_omp.h"
|
||||
#endif // _OPENMP
|
||||
|
||||
@ -1,5 +1,8 @@
|
||||
#ifndef CAFFE2_UTILS_MKL_UTILS_H_
|
||||
#define CAFFE2_UTILS_MKL_UTILS_H_
|
||||
|
||||
#include "caffe2/core/macros.h" // For caffe2 macros.
|
||||
|
||||
#ifdef CAFFE2_USE_MKL
|
||||
|
||||
#include "caffe2/mkl/utils/mkl_version_check.h"
|
||||
|
||||
@ -1,6 +1,8 @@
|
||||
// This is the exact cblas.h header file, placed here purely in order to get
|
||||
// the enums.
|
||||
|
||||
#include "caffe2/core/macros.h"
|
||||
|
||||
#ifndef CBLAS_H
|
||||
#ifdef CAFFE2_USE_MKL
|
||||
#include <mkl_cblas.h>
|
||||
|
||||
@ -17,16 +17,16 @@
|
||||
#include <random>
|
||||
#include <unordered_set>
|
||||
|
||||
#ifdef CAFFE2_USE_MKL
|
||||
#include <mkl.h>
|
||||
#endif // CAFFE2_USE_MKL
|
||||
|
||||
#include "caffe2/utils/math.h"
|
||||
#include "caffe2/utils/cpu_neon.h"
|
||||
#include "caffe2/core/context.h"
|
||||
#include "Eigen/Core"
|
||||
#include "Eigen/Dense"
|
||||
|
||||
#ifdef CAFFE2_USE_MKL
|
||||
#include <mkl.h>
|
||||
#endif // CAFFE2_USE_MKL
|
||||
|
||||
#if defined(_MSC_VER)
|
||||
#include <process.h>
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user