Skip to content

Instantly share code, notes, and snippets.

@brokeyourbike
Last active November 14, 2023 09:51
Show Gist options
  • Save brokeyourbike/def7a3313c1e4fdf1334b5c4f0e239f3 to your computer and use it in GitHub Desktop.
Save brokeyourbike/def7a3313c1e4fdf1334b5c4f0e239f3 to your computer and use it in GitHub Desktop.
Install PyTorch 1.7 with CUDA 10.1 on MacOS High Sierra 10.13.6 + GTX 1060 6GB

Install PyTorch 1.7 with CUDA 10.1 on MacOS High Sierra 10.13.6 + GTX 1060 6GB

Install web driver for NVIDIA

  1. install webdriver.sh
brew tap vulgo/repo
brew install webdriver.sh
  1. install lastest driver
webdriver

installed version 387.10.10.10.40.133

source

Install CUDA

  1. install cuda via brew:
brew tap homebrew/cask-drivers
brew cask install nvidia-cuda
  1. add the following to your file ~/.bash_profile:
export PATH=/Developer/NVIDIA/CUDA-9.0/bin${PATH:+:${PATH}}
export DYLD_LIBRARY_PATH=/Developer/NVIDIA/CUDA-9.0/lib${DYLD_LIBRARY_PATH:+:${DYLD_LIBRARY_PATH}}
  1. verify installation
nvcc --version

installed version 418.105

source

Install cuDNN

  1. download cuDNN v7.6.5 (November 5th, 2019), for CUDA 10.1
  2. untar tar -xzvf cudnn-10.1-osx-x64-v7.6.5.32.tgz
  3. copy the files into the CUDA Toolkit directory, and change the file permissions
sudo cp cuda/include/cudnn*.h /usr/local/cuda/include
sudo cp cuda/lib/libcudnn* /usr/local/cuda/lib
sudo chmod a+r /usr/local/cuda/include/cudnn*.h /usr/local/cuda/lib64/libcudnn*

installed version 7.6.5

source

Build PyTorch from source

  1. install anaconda
  2. remove previous versions of pythorch
conda remove pytorch torchvision -y
pip uninstall torch -y
pip uninstall torch -y  # yes twice
  1. install dependencies
conda install numpy ninja pyyaml mkl mkl-include setuptools cmake cffi typing_extensions future six requests
  1. get pytorch source
git clone --recursive https://github.com/pytorch/pytorch
cd pytorch
  1. install pytorch
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
MACOSX_DEPLOYMENT_TARGET=10.13 CC=clang CXX=clang++ python setup.py install

error when linking libtorch_cuda.dylib on macOS 10.13.6 fix

  1. build torchvision from source
git clone --recursive https://github.com/pytorch/vision
cd vision
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}
MACOSX_DEPLOYMENT_TARGET=10.13 CC=clang CXX=clang++ python setup.py install
  1. verify installation
import torch
print(torch.__version__)
import torch
assert torch.cuda.is_available()
assert torch.randn(20).cuda().is_cuda
import torch
assert torch.backends.cudnn.enabled

installed version 1.7.0a0+eeb43ff

@geoffwoollard
Copy link

I simple removed the folder /Developer/NVIDIA/CUDA-7.5/bin/nvcc and the build proceeded until this error.

(torch_conda_gpu) gws-MacBook-Pro-6:pytorch gw$ MACOSX_DEPLOYMENT_TARGET=10.13 CC=clang CXX=clang++ python setup.py install
Building wheel torch-1.13.0a0+git4c0000a
-- Building version 1.13.0a0+git4c0000a
cmake --build . --target install --config Release
[1/78] Building CXX object caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPooling.cpp.DEFAULT.cpp.o
FAILED: caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPooling.cpp.DEFAULT.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -DAT_PER_OPERATOR_HEADERS -DCPUINFO_SUPPORTED_PLATFORM=1 -DFMT_HEADER_ONLY=1 -DFXDIV_USE_INLINE_ASSEMBLY=0 -DHAVE_MMAP=1 -DHAVE_SHM_OPEN=1 -DHAVE_SHM_UNLINK=1 -DIDEEP_USE_MKL -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS -DNNP_CONVOLUTION_ONLY=0 -DNNP_INFERENCE_ONLY=0 -DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DUSE_EXTERNAL_MZCRC -D_FILE_OFFSET_BITS=64 -Dtorch_cpu_EXPORTS -I/Users/gw/repos/pytorch/build/aten/src -I/Users/gw/repos/pytorch/aten/src -I/Users/gw/repos/pytorch/build -I/Users/gw/repos/pytorch -I/Users/gw/repos/pytorch/cmake/../third_party/benchmark/include -I/Users/gw/repos/pytorch/third_party/onnx -I/Users/gw/repos/pytorch/build/third_party/onnx -I/Users/gw/repos/pytorch/third_party/foxi -I/Users/gw/repos/pytorch/build/third_party/foxi -I/Users/gw/repos/pytorch/torch/csrc/api -I/Users/gw/repos/pytorch/torch/csrc/api/include -I/Users/gw/repos/pytorch/caffe2/aten/src/TH -I/Users/gw/repos/pytorch/build/caffe2/aten/src/TH -I/Users/gw/repos/pytorch/build/caffe2/aten/src -I/Users/gw/repos/pytorch/build/caffe2/../aten/src -I/Users/gw/repos/pytorch/torch/csrc -I/Users/gw/repos/pytorch/third_party/miniz-2.1.0 -I/Users/gw/repos/pytorch/third_party/kineto/libkineto/include -I/Users/gw/repos/pytorch/third_party/kineto/libkineto/src -I/Users/gw/repos/pytorch/torch/csrc/distributed -I/Users/gw/repos/pytorch/aten/../third_party/catch/single_include -I/Users/gw/repos/pytorch/aten/src/ATen/.. -I/Users/gw/repos/pytorch/third_party/FXdiv/include -I/Users/gw/repos/pytorch/c10/.. -I/Users/gw/repos/pytorch/third_party/pthreadpool/include -I/Users/gw/repos/pytorch/third_party/cpuinfo/include -I/Users/gw/repos/pytorch/third_party/QNNPACK/include -I/Users/gw/repos/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/include -I/Users/gw/repos/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/src -I/Users/gw/repos/pytorch/third_party/cpuinfo/deps/clog/include -I/Users/gw/repos/pytorch/third_party/NNPACK/include -I/Users/gw/repos/pytorch/third_party/fbgemm/include -I/Users/gw/repos/pytorch/third_party/fbgemm -I/Users/gw/repos/pytorch/third_party/fbgemm/third_party/asmjit/src -I/Users/gw/repos/pytorch/third_party/ittapi/src/ittnotify -I/Users/gw/repos/pytorch/third_party/FP16/include -I/Users/gw/repos/pytorch/third_party/fmt/include -I/Users/gw/repos/pytorch/build/third_party/ideep/mkl-dnn/third_party/oneDNN/include -I/Users/gw/repos/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/src/../include -I/Users/gw/repos/pytorch/third_party/flatbuffers/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/googletest/googletest/include -isystem /Users/gw/repos/pytorch/third_party/protobuf/src -isystem /Users/gw/miniconda2/envs/torch_conda_gpu/include -isystem /Users/gw/repos/pytorch/third_party/gemmlowp -isystem /Users/gw/repos/pytorch/third_party/neon2sse -isystem /Users/gw/repos/pytorch/third_party/XNNPACK/include -isystem /Users/gw/repos/pytorch/third_party/ittapi/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/eigen -isystem /Users/gw/repos/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/include -isystem /Users/gw/repos/pytorch/third_party/ideep/include -isystem /Users/gw/repos/pytorch/build/include -Wno-deprecated -fvisibility-inlines-hidden -Wno-deprecated-declarations -DUSE_PTHREADPOOL -Xpreprocessor -fopenmp -I/Users/gw/miniconda2/envs/torch_conda_gpu/include -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-range-loop-analysis -Wno-pass-failed -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -Wconstant-conversion -Wno-invalid-partial-specialization -Wno-typedef-redefinition -Wno-unknown-warning-option -Wno-unused-private-field -Wno-inconsistent-missing-override -Wno-aligned-allocation-unavailable -Wno-c++14-extensions -Wno-constexpr-not-const -Wno-missing-braces -Qunused-arguments -fcolor-diagnostics -faligned-new -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-unused-private-field -Wno-missing-braces -Wno-c++14-extensions -Wno-constexpr-not-const -DHAVE_AVX512_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION -O3 -DNDEBUG -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.9 -fPIC -DTH_HAVE_THREAD -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-missing-field-initializers -Wno-write-strings -Wno-unknown-pragmas -Wno-type-limits -Wno-array-bounds -Wno-sign-compare -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-missing-braces -Wno-range-loop-analysis -fvisibility=hidden -O2 -Xpreprocessor -fopenmp -I/Users/gw/miniconda2/envs/torch_conda_gpu/include -DCAFFE2_BUILD_MAIN_LIB -DASMJIT_STATIC -std=gnu++14 -O3  -DCPU_CAPABILITY=DEFAULT -DCPU_CAPABILITY_DEFAULT -MD -MT caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPooling.cpp.DEFAULT.cpp.o -MF caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPooling.cpp.DEFAULT.cpp.o.d -o caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPooling.cpp.DEFAULT.cpp.o -c /Users/gw/repos/pytorch/build/aten/src/ATen/native/cpu/MaxPooling.cpp.DEFAULT.cpp
In file included from /Users/gw/repos/pytorch/build/aten/src/ATen/native/cpu/MaxPooling.cpp.DEFAULT.cpp:1:
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/MaxPooling.cpp:25:25: error: no matching function for call to 'isnan'
      bool update_max = std::isnan(val) || op[oj] < val;
                        ^~~~~~~~~~
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/MaxPooling.cpp:50:9: note: in instantiation of function template specialization 'at::native::(anonymous namespace)::max_pool1d_kernel<c10::BFloat16>' requested here
        max_pool1d_kernel(op, ip, p);
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:505:1: note: candidate template ignored: requirement 'std::is_floating_point<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1 __lcpp_x) _NOEXCEPT
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:513:1: note: candidate template ignored: requirement 'std::is_integral<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1) _NOEXCEPT
^
1 error generated.
[2/78] Building CXX object caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.DEFAULT.cpp.o
FAILED: caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.DEFAULT.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -DAT_PER_OPERATOR_HEADERS -DCPUINFO_SUPPORTED_PLATFORM=1 -DFMT_HEADER_ONLY=1 -DFXDIV_USE_INLINE_ASSEMBLY=0 -DHAVE_MMAP=1 -DHAVE_SHM_OPEN=1 -DHAVE_SHM_UNLINK=1 -DIDEEP_USE_MKL -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS -DNNP_CONVOLUTION_ONLY=0 -DNNP_INFERENCE_ONLY=0 -DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DUSE_EXTERNAL_MZCRC -D_FILE_OFFSET_BITS=64 -Dtorch_cpu_EXPORTS -I/Users/gw/repos/pytorch/build/aten/src -I/Users/gw/repos/pytorch/aten/src -I/Users/gw/repos/pytorch/build -I/Users/gw/repos/pytorch -I/Users/gw/repos/pytorch/cmake/../third_party/benchmark/include -I/Users/gw/repos/pytorch/third_party/onnx -I/Users/gw/repos/pytorch/build/third_party/onnx -I/Users/gw/repos/pytorch/third_party/foxi -I/Users/gw/repos/pytorch/build/third_party/foxi -I/Users/gw/repos/pytorch/torch/csrc/api -I/Users/gw/repos/pytorch/torch/csrc/api/include -I/Users/gw/repos/pytorch/caffe2/aten/src/TH -I/Users/gw/repos/pytorch/build/caffe2/aten/src/TH -I/Users/gw/repos/pytorch/build/caffe2/aten/src -I/Users/gw/repos/pytorch/build/caffe2/../aten/src -I/Users/gw/repos/pytorch/torch/csrc -I/Users/gw/repos/pytorch/third_party/miniz-2.1.0 -I/Users/gw/repos/pytorch/third_party/kineto/libkineto/include -I/Users/gw/repos/pytorch/third_party/kineto/libkineto/src -I/Users/gw/repos/pytorch/torch/csrc/distributed -I/Users/gw/repos/pytorch/aten/../third_party/catch/single_include -I/Users/gw/repos/pytorch/aten/src/ATen/.. -I/Users/gw/repos/pytorch/third_party/FXdiv/include -I/Users/gw/repos/pytorch/c10/.. -I/Users/gw/repos/pytorch/third_party/pthreadpool/include -I/Users/gw/repos/pytorch/third_party/cpuinfo/include -I/Users/gw/repos/pytorch/third_party/QNNPACK/include -I/Users/gw/repos/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/include -I/Users/gw/repos/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/src -I/Users/gw/repos/pytorch/third_party/cpuinfo/deps/clog/include -I/Users/gw/repos/pytorch/third_party/NNPACK/include -I/Users/gw/repos/pytorch/third_party/fbgemm/include -I/Users/gw/repos/pytorch/third_party/fbgemm -I/Users/gw/repos/pytorch/third_party/fbgemm/third_party/asmjit/src -I/Users/gw/repos/pytorch/third_party/ittapi/src/ittnotify -I/Users/gw/repos/pytorch/third_party/FP16/include -I/Users/gw/repos/pytorch/third_party/fmt/include -I/Users/gw/repos/pytorch/build/third_party/ideep/mkl-dnn/third_party/oneDNN/include -I/Users/gw/repos/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/src/../include -I/Users/gw/repos/pytorch/third_party/flatbuffers/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/googletest/googletest/include -isystem /Users/gw/repos/pytorch/third_party/protobuf/src -isystem /Users/gw/miniconda2/envs/torch_conda_gpu/include -isystem /Users/gw/repos/pytorch/third_party/gemmlowp -isystem /Users/gw/repos/pytorch/third_party/neon2sse -isystem /Users/gw/repos/pytorch/third_party/XNNPACK/include -isystem /Users/gw/repos/pytorch/third_party/ittapi/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/eigen -isystem /Users/gw/repos/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/include -isystem /Users/gw/repos/pytorch/third_party/ideep/include -isystem /Users/gw/repos/pytorch/build/include -Wno-deprecated -fvisibility-inlines-hidden -Wno-deprecated-declarations -DUSE_PTHREADPOOL -Xpreprocessor -fopenmp -I/Users/gw/miniconda2/envs/torch_conda_gpu/include -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-range-loop-analysis -Wno-pass-failed -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -Wconstant-conversion -Wno-invalid-partial-specialization -Wno-typedef-redefinition -Wno-unknown-warning-option -Wno-unused-private-field -Wno-inconsistent-missing-override -Wno-aligned-allocation-unavailable -Wno-c++14-extensions -Wno-constexpr-not-const -Wno-missing-braces -Qunused-arguments -fcolor-diagnostics -faligned-new -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-unused-private-field -Wno-missing-braces -Wno-c++14-extensions -Wno-constexpr-not-const -DHAVE_AVX512_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION -O3 -DNDEBUG -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.9 -fPIC -DTH_HAVE_THREAD -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-missing-field-initializers -Wno-write-strings -Wno-unknown-pragmas -Wno-type-limits -Wno-array-bounds -Wno-sign-compare -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-missing-braces -Wno-range-loop-analysis -fvisibility=hidden -O2 -Xpreprocessor -fopenmp -I/Users/gw/miniconda2/envs/torch_conda_gpu/include -DCAFFE2_BUILD_MAIN_LIB -DASMJIT_STATIC -std=gnu++14 -O3  -DCPU_CAPABILITY=DEFAULT -DCPU_CAPABILITY_DEFAULT -MD -MT caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.DEFAULT.cpp.o -MF caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.DEFAULT.cpp.o.d -o caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.DEFAULT.cpp.o -c /Users/gw/repos/pytorch/build/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.DEFAULT.cpp
In file included from /Users/gw/repos/pytorch/build/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.DEFAULT.cpp:1:
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp:59:37: error: no matching function for call to 'isnan'
              if ((val > maxval) || std::isnan(val)) {
                                    ^~~~~~~~~~
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp:442:11: note: in instantiation of function template specialization 'at::native::(anonymous namespace)::cpu_adaptive_max_pool<c10::BFloat16, float>' requested here
          cpu_adaptive_max_pool<BFloat16, /*accscalar_t*/float>(output, indices, input, output_size);
          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:505:1: note: candidate template ignored: requirement 'std::is_floating_point<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1 __lcpp_x) _NOEXCEPT
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:513:1: note: candidate template ignored: requirement 'std::is_integral<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1) _NOEXCEPT
^
In file included from /Users/gw/repos/pytorch/build/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.DEFAULT.cpp:1:
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp:59:37: error: no matching function for call to 'isnan'
              if ((val > maxval) || std::isnan(val)) {
                                    ^~~~~~~~~~
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp:444:11: note: in instantiation of function template specialization 'at::native::(anonymous namespace)::cpu_adaptive_max_pool<c10::BFloat16, c10::BFloat16>' requested here
          cpu_adaptive_max_pool<scalar_t, scalar_t>(output, indices, input, output_size);
          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:505:1: note: candidate template ignored: requirement 'std::is_floating_point<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1 __lcpp_x) _NOEXCEPT
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:513:1: note: candidate template ignored: requirement 'std::is_integral<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1) _NOEXCEPT
^
2 errors generated.
[3/78] Building CXX object caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPoolKernel.cpp.DEFAULT.cpp.o
FAILED: caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPoolKernel.cpp.DEFAULT.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -DAT_PER_OPERATOR_HEADERS -DCPUINFO_SUPPORTED_PLATFORM=1 -DFMT_HEADER_ONLY=1 -DFXDIV_USE_INLINE_ASSEMBLY=0 -DHAVE_MMAP=1 -DHAVE_SHM_OPEN=1 -DHAVE_SHM_UNLINK=1 -DIDEEP_USE_MKL -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS -DNNP_CONVOLUTION_ONLY=0 -DNNP_INFERENCE_ONLY=0 -DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DUSE_EXTERNAL_MZCRC -D_FILE_OFFSET_BITS=64 -Dtorch_cpu_EXPORTS -I/Users/gw/repos/pytorch/build/aten/src -I/Users/gw/repos/pytorch/aten/src -I/Users/gw/repos/pytorch/build -I/Users/gw/repos/pytorch -I/Users/gw/repos/pytorch/cmake/../third_party/benchmark/include -I/Users/gw/repos/pytorch/third_party/onnx -I/Users/gw/repos/pytorch/build/third_party/onnx -I/Users/gw/repos/pytorch/third_party/foxi -I/Users/gw/repos/pytorch/build/third_party/foxi -I/Users/gw/repos/pytorch/torch/csrc/api -I/Users/gw/repos/pytorch/torch/csrc/api/include -I/Users/gw/repos/pytorch/caffe2/aten/src/TH -I/Users/gw/repos/pytorch/build/caffe2/aten/src/TH -I/Users/gw/repos/pytorch/build/caffe2/aten/src -I/Users/gw/repos/pytorch/build/caffe2/../aten/src -I/Users/gw/repos/pytorch/torch/csrc -I/Users/gw/repos/pytorch/third_party/miniz-2.1.0 -I/Users/gw/repos/pytorch/third_party/kineto/libkineto/include -I/Users/gw/repos/pytorch/third_party/kineto/libkineto/src -I/Users/gw/repos/pytorch/torch/csrc/distributed -I/Users/gw/repos/pytorch/aten/../third_party/catch/single_include -I/Users/gw/repos/pytorch/aten/src/ATen/.. -I/Users/gw/repos/pytorch/third_party/FXdiv/include -I/Users/gw/repos/pytorch/c10/.. -I/Users/gw/repos/pytorch/third_party/pthreadpool/include -I/Users/gw/repos/pytorch/third_party/cpuinfo/include -I/Users/gw/repos/pytorch/third_party/QNNPACK/include -I/Users/gw/repos/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/include -I/Users/gw/repos/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/src -I/Users/gw/repos/pytorch/third_party/cpuinfo/deps/clog/include -I/Users/gw/repos/pytorch/third_party/NNPACK/include -I/Users/gw/repos/pytorch/third_party/fbgemm/include -I/Users/gw/repos/pytorch/third_party/fbgemm -I/Users/gw/repos/pytorch/third_party/fbgemm/third_party/asmjit/src -I/Users/gw/repos/pytorch/third_party/ittapi/src/ittnotify -I/Users/gw/repos/pytorch/third_party/FP16/include -I/Users/gw/repos/pytorch/third_party/fmt/include -I/Users/gw/repos/pytorch/build/third_party/ideep/mkl-dnn/third_party/oneDNN/include -I/Users/gw/repos/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/src/../include -I/Users/gw/repos/pytorch/third_party/flatbuffers/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/googletest/googletest/include -isystem /Users/gw/repos/pytorch/third_party/protobuf/src -isystem /Users/gw/miniconda2/envs/torch_conda_gpu/include -isystem /Users/gw/repos/pytorch/third_party/gemmlowp -isystem /Users/gw/repos/pytorch/third_party/neon2sse -isystem /Users/gw/repos/pytorch/third_party/XNNPACK/include -isystem /Users/gw/repos/pytorch/third_party/ittapi/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/eigen -isystem /Users/gw/repos/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/include -isystem /Users/gw/repos/pytorch/third_party/ideep/include -isystem /Users/gw/repos/pytorch/build/include -Wno-deprecated -fvisibility-inlines-hidden -Wno-deprecated-declarations -DUSE_PTHREADPOOL -Xpreprocessor -fopenmp -I/Users/gw/miniconda2/envs/torch_conda_gpu/include -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-range-loop-analysis -Wno-pass-failed -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -Wconstant-conversion -Wno-invalid-partial-specialization -Wno-typedef-redefinition -Wno-unknown-warning-option -Wno-unused-private-field -Wno-inconsistent-missing-override -Wno-aligned-allocation-unavailable -Wno-c++14-extensions -Wno-constexpr-not-const -Wno-missing-braces -Qunused-arguments -fcolor-diagnostics -faligned-new -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-unused-private-field -Wno-missing-braces -Wno-c++14-extensions -Wno-constexpr-not-const -DHAVE_AVX512_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION -O3 -DNDEBUG -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.9 -fPIC -DTH_HAVE_THREAD -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-missing-field-initializers -Wno-write-strings -Wno-unknown-pragmas -Wno-type-limits -Wno-array-bounds -Wno-sign-compare -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-missing-braces -Wno-range-loop-analysis -fvisibility=hidden -O2 -Xpreprocessor -fopenmp -I/Users/gw/miniconda2/envs/torch_conda_gpu/include -DCAFFE2_BUILD_MAIN_LIB -DASMJIT_STATIC -std=gnu++14 -O3  -DCPU_CAPABILITY=DEFAULT -DCPU_CAPABILITY_DEFAULT -MD -MT caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPoolKernel.cpp.DEFAULT.cpp.o -MF caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPoolKernel.cpp.DEFAULT.cpp.o.d -o caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPoolKernel.cpp.DEFAULT.cpp.o -c /Users/gw/repos/pytorch/build/aten/src/ATen/native/cpu/MaxPoolKernel.cpp.DEFAULT.cpp
In file included from /Users/gw/repos/pytorch/build/aten/src/ATen/native/cpu/MaxPoolKernel.cpp.DEFAULT.cpp:1:
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/MaxPoolKernel.cpp:67:33: error: no matching function for call to 'isnan'
          if ((val > maxval) || std::isnan(val)) {
                                ^~~~~~~~~~
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/MaxPoolKernel.cpp:468:11: note: in instantiation of function template specialization 'at::native::(anonymous namespace)::cpu_max_pool<c10::BFloat16, c10::BFloat16>' requested here
          cpu_max_pool<scalar_t, scalar_t>(output, indices, input, kW, kH, dW, dH, padW, padH, dilationW, dilationH);
          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:505:1: note: candidate template ignored: requirement 'std::is_floating_point<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1 __lcpp_x) _NOEXCEPT
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:513:1: note: candidate template ignored: requirement 'std::is_integral<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1) _NOEXCEPT
^
1 error generated.
[4/78] Building CXX object caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPooling.cpp.AVX2.cpp.o
FAILED: caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPooling.cpp.AVX2.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -DAT_PER_OPERATOR_HEADERS -DCPUINFO_SUPPORTED_PLATFORM=1 -DFMT_HEADER_ONLY=1 -DFXDIV_USE_INLINE_ASSEMBLY=0 -DHAVE_MMAP=1 -DHAVE_SHM_OPEN=1 -DHAVE_SHM_UNLINK=1 -DIDEEP_USE_MKL -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS -DNNP_CONVOLUTION_ONLY=0 -DNNP_INFERENCE_ONLY=0 -DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DUSE_EXTERNAL_MZCRC -D_FILE_OFFSET_BITS=64 -Dtorch_cpu_EXPORTS -I/Users/gw/repos/pytorch/build/aten/src -I/Users/gw/repos/pytorch/aten/src -I/Users/gw/repos/pytorch/build -I/Users/gw/repos/pytorch -I/Users/gw/repos/pytorch/cmake/../third_party/benchmark/include -I/Users/gw/repos/pytorch/third_party/onnx -I/Users/gw/repos/pytorch/build/third_party/onnx -I/Users/gw/repos/pytorch/third_party/foxi -I/Users/gw/repos/pytorch/build/third_party/foxi -I/Users/gw/repos/pytorch/torch/csrc/api -I/Users/gw/repos/pytorch/torch/csrc/api/include -I/Users/gw/repos/pytorch/caffe2/aten/src/TH -I/Users/gw/repos/pytorch/build/caffe2/aten/src/TH -I/Users/gw/repos/pytorch/build/caffe2/aten/src -I/Users/gw/repos/pytorch/build/caffe2/../aten/src -I/Users/gw/repos/pytorch/torch/csrc -I/Users/gw/repos/pytorch/third_party/miniz-2.1.0 -I/Users/gw/repos/pytorch/third_party/kineto/libkineto/include -I/Users/gw/repos/pytorch/third_party/kineto/libkineto/src -I/Users/gw/repos/pytorch/torch/csrc/distributed -I/Users/gw/repos/pytorch/aten/../third_party/catch/single_include -I/Users/gw/repos/pytorch/aten/src/ATen/.. -I/Users/gw/repos/pytorch/third_party/FXdiv/include -I/Users/gw/repos/pytorch/c10/.. -I/Users/gw/repos/pytorch/third_party/pthreadpool/include -I/Users/gw/repos/pytorch/third_party/cpuinfo/include -I/Users/gw/repos/pytorch/third_party/QNNPACK/include -I/Users/gw/repos/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/include -I/Users/gw/repos/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/src -I/Users/gw/repos/pytorch/third_party/cpuinfo/deps/clog/include -I/Users/gw/repos/pytorch/third_party/NNPACK/include -I/Users/gw/repos/pytorch/third_party/fbgemm/include -I/Users/gw/repos/pytorch/third_party/fbgemm -I/Users/gw/repos/pytorch/third_party/fbgemm/third_party/asmjit/src -I/Users/gw/repos/pytorch/third_party/ittapi/src/ittnotify -I/Users/gw/repos/pytorch/third_party/FP16/include -I/Users/gw/repos/pytorch/third_party/fmt/include -I/Users/gw/repos/pytorch/build/third_party/ideep/mkl-dnn/third_party/oneDNN/include -I/Users/gw/repos/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/src/../include -I/Users/gw/repos/pytorch/third_party/flatbuffers/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/googletest/googletest/include -isystem /Users/gw/repos/pytorch/third_party/protobuf/src -isystem /Users/gw/miniconda2/envs/torch_conda_gpu/include -isystem /Users/gw/repos/pytorch/third_party/gemmlowp -isystem /Users/gw/repos/pytorch/third_party/neon2sse -isystem /Users/gw/repos/pytorch/third_party/XNNPACK/include -isystem /Users/gw/repos/pytorch/third_party/ittapi/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/eigen -isystem /Users/gw/repos/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/include -isystem /Users/gw/repos/pytorch/third_party/ideep/include -isystem /Users/gw/repos/pytorch/build/include -Wno-deprecated -fvisibility-inlines-hidden -Wno-deprecated-declarations -DUSE_PTHREADPOOL -Xpreprocessor -fopenmp -I/Users/gw/miniconda2/envs/torch_conda_gpu/include -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-range-loop-analysis -Wno-pass-failed -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -Wconstant-conversion -Wno-invalid-partial-specialization -Wno-typedef-redefinition -Wno-unknown-warning-option -Wno-unused-private-field -Wno-inconsistent-missing-override -Wno-aligned-allocation-unavailable -Wno-c++14-extensions -Wno-constexpr-not-const -Wno-missing-braces -Qunused-arguments -fcolor-diagnostics -faligned-new -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-unused-private-field -Wno-missing-braces -Wno-c++14-extensions -Wno-constexpr-not-const -DHAVE_AVX512_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION -O3 -DNDEBUG -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.9 -fPIC -DTH_HAVE_THREAD -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-missing-field-initializers -Wno-write-strings -Wno-unknown-pragmas -Wno-type-limits -Wno-array-bounds -Wno-sign-compare -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-missing-braces -Wno-range-loop-analysis -fvisibility=hidden -O2 -Xpreprocessor -fopenmp -I/Users/gw/miniconda2/envs/torch_conda_gpu/include -DCAFFE2_BUILD_MAIN_LIB -DASMJIT_STATIC -std=gnu++14 -O3  -mavx2 -mfma  -DCPU_CAPABILITY=AVX2 -DCPU_CAPABILITY_AVX2 -MD -MT caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPooling.cpp.AVX2.cpp.o -MF caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPooling.cpp.AVX2.cpp.o.d -o caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPooling.cpp.AVX2.cpp.o -c /Users/gw/repos/pytorch/build/aten/src/ATen/native/cpu/MaxPooling.cpp.AVX2.cpp
In file included from /Users/gw/repos/pytorch/build/aten/src/ATen/native/cpu/MaxPooling.cpp.AVX2.cpp:1:
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/MaxPooling.cpp:25:25: error: no matching function for call to 'isnan'
      bool update_max = std::isnan(val) || op[oj] < val;
                        ^~~~~~~~~~
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/MaxPooling.cpp:50:9: note: in instantiation of function template specialization 'at::native::(anonymous namespace)::max_pool1d_kernel<c10::BFloat16>' requested here
        max_pool1d_kernel(op, ip, p);
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:505:1: note: candidate template ignored: requirement 'std::is_floating_point<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1 __lcpp_x) _NOEXCEPT
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:513:1: note: candidate template ignored: requirement 'std::is_integral<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1) _NOEXCEPT
^
1 error generated.
[5/78] Building CXX object caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPooling.cpp.AVX512.cpp.o
FAILED: caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPooling.cpp.AVX512.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -DAT_PER_OPERATOR_HEADERS -DCPUINFO_SUPPORTED_PLATFORM=1 -DFMT_HEADER_ONLY=1 -DFXDIV_USE_INLINE_ASSEMBLY=0 -DHAVE_MMAP=1 -DHAVE_SHM_OPEN=1 -DHAVE_SHM_UNLINK=1 -DIDEEP_USE_MKL -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS -DNNP_CONVOLUTION_ONLY=0 -DNNP_INFERENCE_ONLY=0 -DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DUSE_EXTERNAL_MZCRC -D_FILE_OFFSET_BITS=64 -Dtorch_cpu_EXPORTS -I/Users/gw/repos/pytorch/build/aten/src -I/Users/gw/repos/pytorch/aten/src -I/Users/gw/repos/pytorch/build -I/Users/gw/repos/pytorch -I/Users/gw/repos/pytorch/cmake/../third_party/benchmark/include -I/Users/gw/repos/pytorch/third_party/onnx -I/Users/gw/repos/pytorch/build/third_party/onnx -I/Users/gw/repos/pytorch/third_party/foxi -I/Users/gw/repos/pytorch/build/third_party/foxi -I/Users/gw/repos/pytorch/torch/csrc/api -I/Users/gw/repos/pytorch/torch/csrc/api/include -I/Users/gw/repos/pytorch/caffe2/aten/src/TH -I/Users/gw/repos/pytorch/build/caffe2/aten/src/TH -I/Users/gw/repos/pytorch/build/caffe2/aten/src -I/Users/gw/repos/pytorch/build/caffe2/../aten/src -I/Users/gw/repos/pytorch/torch/csrc -I/Users/gw/repos/pytorch/third_party/miniz-2.1.0 -I/Users/gw/repos/pytorch/third_party/kineto/libkineto/include -I/Users/gw/repos/pytorch/third_party/kineto/libkineto/src -I/Users/gw/repos/pytorch/torch/csrc/distributed -I/Users/gw/repos/pytorch/aten/../third_party/catch/single_include -I/Users/gw/repos/pytorch/aten/src/ATen/.. -I/Users/gw/repos/pytorch/third_party/FXdiv/include -I/Users/gw/repos/pytorch/c10/.. -I/Users/gw/repos/pytorch/third_party/pthreadpool/include -I/Users/gw/repos/pytorch/third_party/cpuinfo/include -I/Users/gw/repos/pytorch/third_party/QNNPACK/include -I/Users/gw/repos/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/include -I/Users/gw/repos/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/src -I/Users/gw/repos/pytorch/third_party/cpuinfo/deps/clog/include -I/Users/gw/repos/pytorch/third_party/NNPACK/include -I/Users/gw/repos/pytorch/third_party/fbgemm/include -I/Users/gw/repos/pytorch/third_party/fbgemm -I/Users/gw/repos/pytorch/third_party/fbgemm/third_party/asmjit/src -I/Users/gw/repos/pytorch/third_party/ittapi/src/ittnotify -I/Users/gw/repos/pytorch/third_party/FP16/include -I/Users/gw/repos/pytorch/third_party/fmt/include -I/Users/gw/repos/pytorch/build/third_party/ideep/mkl-dnn/third_party/oneDNN/include -I/Users/gw/repos/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/src/../include -I/Users/gw/repos/pytorch/third_party/flatbuffers/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/googletest/googletest/include -isystem /Users/gw/repos/pytorch/third_party/protobuf/src -isystem /Users/gw/miniconda2/envs/torch_conda_gpu/include -isystem /Users/gw/repos/pytorch/third_party/gemmlowp -isystem /Users/gw/repos/pytorch/third_party/neon2sse -isystem /Users/gw/repos/pytorch/third_party/XNNPACK/include -isystem /Users/gw/repos/pytorch/third_party/ittapi/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/eigen -isystem /Users/gw/repos/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/include -isystem /Users/gw/repos/pytorch/third_party/ideep/include -isystem /Users/gw/repos/pytorch/build/include -Wno-deprecated -fvisibility-inlines-hidden -Wno-deprecated-declarations -DUSE_PTHREADPOOL -Xpreprocessor -fopenmp -I/Users/gw/miniconda2/envs/torch_conda_gpu/include -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-range-loop-analysis -Wno-pass-failed -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -Wconstant-conversion -Wno-invalid-partial-specialization -Wno-typedef-redefinition -Wno-unknown-warning-option -Wno-unused-private-field -Wno-inconsistent-missing-override -Wno-aligned-allocation-unavailable -Wno-c++14-extensions -Wno-constexpr-not-const -Wno-missing-braces -Qunused-arguments -fcolor-diagnostics -faligned-new -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-unused-private-field -Wno-missing-braces -Wno-c++14-extensions -Wno-constexpr-not-const -DHAVE_AVX512_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION -O3 -DNDEBUG -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.9 -fPIC -DTH_HAVE_THREAD -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-missing-field-initializers -Wno-write-strings -Wno-unknown-pragmas -Wno-type-limits -Wno-array-bounds -Wno-sign-compare -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-missing-braces -Wno-range-loop-analysis -fvisibility=hidden -O2 -Xpreprocessor -fopenmp -I/Users/gw/miniconda2/envs/torch_conda_gpu/include -DCAFFE2_BUILD_MAIN_LIB -DASMJIT_STATIC -std=gnu++14 -O3  -mavx512f -mavx512bw -mavx512vl -mavx512dq -mfma -DCPU_CAPABILITY=AVX512 -DCPU_CAPABILITY_AVX512 -MD -MT caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPooling.cpp.AVX512.cpp.o -MF caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPooling.cpp.AVX512.cpp.o.d -o caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPooling.cpp.AVX512.cpp.o -c /Users/gw/repos/pytorch/build/aten/src/ATen/native/cpu/MaxPooling.cpp.AVX512.cpp
In file included from /Users/gw/repos/pytorch/build/aten/src/ATen/native/cpu/MaxPooling.cpp.AVX512.cpp:1:
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/MaxPooling.cpp:25:25: error: no matching function for call to 'isnan'
      bool update_max = std::isnan(val) || op[oj] < val;
                        ^~~~~~~~~~
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/MaxPooling.cpp:50:9: note: in instantiation of function template specialization 'at::native::(anonymous namespace)::max_pool1d_kernel<c10::BFloat16>' requested here
        max_pool1d_kernel(op, ip, p);
        ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:505:1: note: candidate template ignored: requirement 'std::is_floating_point<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1 __lcpp_x) _NOEXCEPT
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:513:1: note: candidate template ignored: requirement 'std::is_integral<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1) _NOEXCEPT
^
1 error generated.
[6/78] Building CXX object caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.AVX2.cpp.o
FAILED: caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.AVX2.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -DAT_PER_OPERATOR_HEADERS -DCPUINFO_SUPPORTED_PLATFORM=1 -DFMT_HEADER_ONLY=1 -DFXDIV_USE_INLINE_ASSEMBLY=0 -DHAVE_MMAP=1 -DHAVE_SHM_OPEN=1 -DHAVE_SHM_UNLINK=1 -DIDEEP_USE_MKL -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS -DNNP_CONVOLUTION_ONLY=0 -DNNP_INFERENCE_ONLY=0 -DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DUSE_EXTERNAL_MZCRC -D_FILE_OFFSET_BITS=64 -Dtorch_cpu_EXPORTS -I/Users/gw/repos/pytorch/build/aten/src -I/Users/gw/repos/pytorch/aten/src -I/Users/gw/repos/pytorch/build -I/Users/gw/repos/pytorch -I/Users/gw/repos/pytorch/cmake/../third_party/benchmark/include -I/Users/gw/repos/pytorch/third_party/onnx -I/Users/gw/repos/pytorch/build/third_party/onnx -I/Users/gw/repos/pytorch/third_party/foxi -I/Users/gw/repos/pytorch/build/third_party/foxi -I/Users/gw/repos/pytorch/torch/csrc/api -I/Users/gw/repos/pytorch/torch/csrc/api/include -I/Users/gw/repos/pytorch/caffe2/aten/src/TH -I/Users/gw/repos/pytorch/build/caffe2/aten/src/TH -I/Users/gw/repos/pytorch/build/caffe2/aten/src -I/Users/gw/repos/pytorch/build/caffe2/../aten/src -I/Users/gw/repos/pytorch/torch/csrc -I/Users/gw/repos/pytorch/third_party/miniz-2.1.0 -I/Users/gw/repos/pytorch/third_party/kineto/libkineto/include -I/Users/gw/repos/pytorch/third_party/kineto/libkineto/src -I/Users/gw/repos/pytorch/torch/csrc/distributed -I/Users/gw/repos/pytorch/aten/../third_party/catch/single_include -I/Users/gw/repos/pytorch/aten/src/ATen/.. -I/Users/gw/repos/pytorch/third_party/FXdiv/include -I/Users/gw/repos/pytorch/c10/.. -I/Users/gw/repos/pytorch/third_party/pthreadpool/include -I/Users/gw/repos/pytorch/third_party/cpuinfo/include -I/Users/gw/repos/pytorch/third_party/QNNPACK/include -I/Users/gw/repos/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/include -I/Users/gw/repos/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/src -I/Users/gw/repos/pytorch/third_party/cpuinfo/deps/clog/include -I/Users/gw/repos/pytorch/third_party/NNPACK/include -I/Users/gw/repos/pytorch/third_party/fbgemm/include -I/Users/gw/repos/pytorch/third_party/fbgemm -I/Users/gw/repos/pytorch/third_party/fbgemm/third_party/asmjit/src -I/Users/gw/repos/pytorch/third_party/ittapi/src/ittnotify -I/Users/gw/repos/pytorch/third_party/FP16/include -I/Users/gw/repos/pytorch/third_party/fmt/include -I/Users/gw/repos/pytorch/build/third_party/ideep/mkl-dnn/third_party/oneDNN/include -I/Users/gw/repos/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/src/../include -I/Users/gw/repos/pytorch/third_party/flatbuffers/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/googletest/googletest/include -isystem /Users/gw/repos/pytorch/third_party/protobuf/src -isystem /Users/gw/miniconda2/envs/torch_conda_gpu/include -isystem /Users/gw/repos/pytorch/third_party/gemmlowp -isystem /Users/gw/repos/pytorch/third_party/neon2sse -isystem /Users/gw/repos/pytorch/third_party/XNNPACK/include -isystem /Users/gw/repos/pytorch/third_party/ittapi/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/eigen -isystem /Users/gw/repos/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/include -isystem /Users/gw/repos/pytorch/third_party/ideep/include -isystem /Users/gw/repos/pytorch/build/include -Wno-deprecated -fvisibility-inlines-hidden -Wno-deprecated-declarations -DUSE_PTHREADPOOL -Xpreprocessor -fopenmp -I/Users/gw/miniconda2/envs/torch_conda_gpu/include -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-range-loop-analysis -Wno-pass-failed -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -Wconstant-conversion -Wno-invalid-partial-specialization -Wno-typedef-redefinition -Wno-unknown-warning-option -Wno-unused-private-field -Wno-inconsistent-missing-override -Wno-aligned-allocation-unavailable -Wno-c++14-extensions -Wno-constexpr-not-const -Wno-missing-braces -Qunused-arguments -fcolor-diagnostics -faligned-new -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-unused-private-field -Wno-missing-braces -Wno-c++14-extensions -Wno-constexpr-not-const -DHAVE_AVX512_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION -O3 -DNDEBUG -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.9 -fPIC -DTH_HAVE_THREAD -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-missing-field-initializers -Wno-write-strings -Wno-unknown-pragmas -Wno-type-limits -Wno-array-bounds -Wno-sign-compare -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-missing-braces -Wno-range-loop-analysis -fvisibility=hidden -O2 -Xpreprocessor -fopenmp -I/Users/gw/miniconda2/envs/torch_conda_gpu/include -DCAFFE2_BUILD_MAIN_LIB -DASMJIT_STATIC -std=gnu++14 -O3  -mavx2 -mfma  -DCPU_CAPABILITY=AVX2 -DCPU_CAPABILITY_AVX2 -MD -MT caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.AVX2.cpp.o -MF caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.AVX2.cpp.o.d -o caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.AVX2.cpp.o -c /Users/gw/repos/pytorch/build/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.AVX2.cpp
In file included from /Users/gw/repos/pytorch/build/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.AVX2.cpp:1:
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp:59:37: error: no matching function for call to 'isnan'
              if ((val > maxval) || std::isnan(val)) {
                                    ^~~~~~~~~~
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp:442:11: note: in instantiation of function template specialization 'at::native::(anonymous namespace)::cpu_adaptive_max_pool<c10::BFloat16, float>' requested here
          cpu_adaptive_max_pool<BFloat16, /*accscalar_t*/float>(output, indices, input, output_size);
          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:505:1: note: candidate template ignored: requirement 'std::is_floating_point<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1 __lcpp_x) _NOEXCEPT
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:513:1: note: candidate template ignored: requirement 'std::is_integral<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1) _NOEXCEPT
^
In file included from /Users/gw/repos/pytorch/build/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.AVX2.cpp:1:
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp:59:37: error: no matching function for call to 'isnan'
              if ((val > maxval) || std::isnan(val)) {
                                    ^~~~~~~~~~
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp:444:11: note: in instantiation of function template specialization 'at::native::(anonymous namespace)::cpu_adaptive_max_pool<c10::BFloat16, c10::BFloat16>' requested here
          cpu_adaptive_max_pool<scalar_t, scalar_t>(output, indices, input, output_size);
          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:505:1: note: candidate template ignored: requirement 'std::is_floating_point<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1 __lcpp_x) _NOEXCEPT
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:513:1: note: candidate template ignored: requirement 'std::is_integral<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1) _NOEXCEPT
^
2 errors generated.
[7/78] Building CXX object caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPoolKernel.cpp.AVX2.cpp.o
FAILED: caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPoolKernel.cpp.AVX2.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -DAT_PER_OPERATOR_HEADERS -DCPUINFO_SUPPORTED_PLATFORM=1 -DFMT_HEADER_ONLY=1 -DFXDIV_USE_INLINE_ASSEMBLY=0 -DHAVE_MMAP=1 -DHAVE_SHM_OPEN=1 -DHAVE_SHM_UNLINK=1 -DIDEEP_USE_MKL -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS -DNNP_CONVOLUTION_ONLY=0 -DNNP_INFERENCE_ONLY=0 -DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DUSE_EXTERNAL_MZCRC -D_FILE_OFFSET_BITS=64 -Dtorch_cpu_EXPORTS -I/Users/gw/repos/pytorch/build/aten/src -I/Users/gw/repos/pytorch/aten/src -I/Users/gw/repos/pytorch/build -I/Users/gw/repos/pytorch -I/Users/gw/repos/pytorch/cmake/../third_party/benchmark/include -I/Users/gw/repos/pytorch/third_party/onnx -I/Users/gw/repos/pytorch/build/third_party/onnx -I/Users/gw/repos/pytorch/third_party/foxi -I/Users/gw/repos/pytorch/build/third_party/foxi -I/Users/gw/repos/pytorch/torch/csrc/api -I/Users/gw/repos/pytorch/torch/csrc/api/include -I/Users/gw/repos/pytorch/caffe2/aten/src/TH -I/Users/gw/repos/pytorch/build/caffe2/aten/src/TH -I/Users/gw/repos/pytorch/build/caffe2/aten/src -I/Users/gw/repos/pytorch/build/caffe2/../aten/src -I/Users/gw/repos/pytorch/torch/csrc -I/Users/gw/repos/pytorch/third_party/miniz-2.1.0 -I/Users/gw/repos/pytorch/third_party/kineto/libkineto/include -I/Users/gw/repos/pytorch/third_party/kineto/libkineto/src -I/Users/gw/repos/pytorch/torch/csrc/distributed -I/Users/gw/repos/pytorch/aten/../third_party/catch/single_include -I/Users/gw/repos/pytorch/aten/src/ATen/.. -I/Users/gw/repos/pytorch/third_party/FXdiv/include -I/Users/gw/repos/pytorch/c10/.. -I/Users/gw/repos/pytorch/third_party/pthreadpool/include -I/Users/gw/repos/pytorch/third_party/cpuinfo/include -I/Users/gw/repos/pytorch/third_party/QNNPACK/include -I/Users/gw/repos/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/include -I/Users/gw/repos/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/src -I/Users/gw/repos/pytorch/third_party/cpuinfo/deps/clog/include -I/Users/gw/repos/pytorch/third_party/NNPACK/include -I/Users/gw/repos/pytorch/third_party/fbgemm/include -I/Users/gw/repos/pytorch/third_party/fbgemm -I/Users/gw/repos/pytorch/third_party/fbgemm/third_party/asmjit/src -I/Users/gw/repos/pytorch/third_party/ittapi/src/ittnotify -I/Users/gw/repos/pytorch/third_party/FP16/include -I/Users/gw/repos/pytorch/third_party/fmt/include -I/Users/gw/repos/pytorch/build/third_party/ideep/mkl-dnn/third_party/oneDNN/include -I/Users/gw/repos/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/src/../include -I/Users/gw/repos/pytorch/third_party/flatbuffers/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/googletest/googletest/include -isystem /Users/gw/repos/pytorch/third_party/protobuf/src -isystem /Users/gw/miniconda2/envs/torch_conda_gpu/include -isystem /Users/gw/repos/pytorch/third_party/gemmlowp -isystem /Users/gw/repos/pytorch/third_party/neon2sse -isystem /Users/gw/repos/pytorch/third_party/XNNPACK/include -isystem /Users/gw/repos/pytorch/third_party/ittapi/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/eigen -isystem /Users/gw/repos/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/include -isystem /Users/gw/repos/pytorch/third_party/ideep/include -isystem /Users/gw/repos/pytorch/build/include -Wno-deprecated -fvisibility-inlines-hidden -Wno-deprecated-declarations -DUSE_PTHREADPOOL -Xpreprocessor -fopenmp -I/Users/gw/miniconda2/envs/torch_conda_gpu/include -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-range-loop-analysis -Wno-pass-failed -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -Wconstant-conversion -Wno-invalid-partial-specialization -Wno-typedef-redefinition -Wno-unknown-warning-option -Wno-unused-private-field -Wno-inconsistent-missing-override -Wno-aligned-allocation-unavailable -Wno-c++14-extensions -Wno-constexpr-not-const -Wno-missing-braces -Qunused-arguments -fcolor-diagnostics -faligned-new -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-unused-private-field -Wno-missing-braces -Wno-c++14-extensions -Wno-constexpr-not-const -DHAVE_AVX512_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION -O3 -DNDEBUG -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.9 -fPIC -DTH_HAVE_THREAD -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-missing-field-initializers -Wno-write-strings -Wno-unknown-pragmas -Wno-type-limits -Wno-array-bounds -Wno-sign-compare -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-missing-braces -Wno-range-loop-analysis -fvisibility=hidden -O2 -Xpreprocessor -fopenmp -I/Users/gw/miniconda2/envs/torch_conda_gpu/include -DCAFFE2_BUILD_MAIN_LIB -DASMJIT_STATIC -std=gnu++14 -O3  -mavx2 -mfma  -DCPU_CAPABILITY=AVX2 -DCPU_CAPABILITY_AVX2 -MD -MT caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPoolKernel.cpp.AVX2.cpp.o -MF caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPoolKernel.cpp.AVX2.cpp.o.d -o caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPoolKernel.cpp.AVX2.cpp.o -c /Users/gw/repos/pytorch/build/aten/src/ATen/native/cpu/MaxPoolKernel.cpp.AVX2.cpp
In file included from /Users/gw/repos/pytorch/build/aten/src/ATen/native/cpu/MaxPoolKernel.cpp.AVX2.cpp:1:
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/MaxPoolKernel.cpp:67:33: error: no matching function for call to 'isnan'
          if ((val > maxval) || std::isnan(val)) {
                                ^~~~~~~~~~
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/MaxPoolKernel.cpp:468:11: note: in instantiation of function template specialization 'at::native::(anonymous namespace)::cpu_max_pool<c10::BFloat16, c10::BFloat16>' requested here
          cpu_max_pool<scalar_t, scalar_t>(output, indices, input, kW, kH, dW, dH, padW, padH, dilationW, dilationH);
          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:505:1: note: candidate template ignored: requirement 'std::is_floating_point<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1 __lcpp_x) _NOEXCEPT
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:513:1: note: candidate template ignored: requirement 'std::is_integral<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1) _NOEXCEPT
^
1 error generated.
[8/78] Building CXX object caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.AVX512.cpp.o
FAILED: caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.AVX512.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -DAT_PER_OPERATOR_HEADERS -DCPUINFO_SUPPORTED_PLATFORM=1 -DFMT_HEADER_ONLY=1 -DFXDIV_USE_INLINE_ASSEMBLY=0 -DHAVE_MMAP=1 -DHAVE_SHM_OPEN=1 -DHAVE_SHM_UNLINK=1 -DIDEEP_USE_MKL -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS -DNNP_CONVOLUTION_ONLY=0 -DNNP_INFERENCE_ONLY=0 -DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DUSE_EXTERNAL_MZCRC -D_FILE_OFFSET_BITS=64 -Dtorch_cpu_EXPORTS -I/Users/gw/repos/pytorch/build/aten/src -I/Users/gw/repos/pytorch/aten/src -I/Users/gw/repos/pytorch/build -I/Users/gw/repos/pytorch -I/Users/gw/repos/pytorch/cmake/../third_party/benchmark/include -I/Users/gw/repos/pytorch/third_party/onnx -I/Users/gw/repos/pytorch/build/third_party/onnx -I/Users/gw/repos/pytorch/third_party/foxi -I/Users/gw/repos/pytorch/build/third_party/foxi -I/Users/gw/repos/pytorch/torch/csrc/api -I/Users/gw/repos/pytorch/torch/csrc/api/include -I/Users/gw/repos/pytorch/caffe2/aten/src/TH -I/Users/gw/repos/pytorch/build/caffe2/aten/src/TH -I/Users/gw/repos/pytorch/build/caffe2/aten/src -I/Users/gw/repos/pytorch/build/caffe2/../aten/src -I/Users/gw/repos/pytorch/torch/csrc -I/Users/gw/repos/pytorch/third_party/miniz-2.1.0 -I/Users/gw/repos/pytorch/third_party/kineto/libkineto/include -I/Users/gw/repos/pytorch/third_party/kineto/libkineto/src -I/Users/gw/repos/pytorch/torch/csrc/distributed -I/Users/gw/repos/pytorch/aten/../third_party/catch/single_include -I/Users/gw/repos/pytorch/aten/src/ATen/.. -I/Users/gw/repos/pytorch/third_party/FXdiv/include -I/Users/gw/repos/pytorch/c10/.. -I/Users/gw/repos/pytorch/third_party/pthreadpool/include -I/Users/gw/repos/pytorch/third_party/cpuinfo/include -I/Users/gw/repos/pytorch/third_party/QNNPACK/include -I/Users/gw/repos/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/include -I/Users/gw/repos/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/src -I/Users/gw/repos/pytorch/third_party/cpuinfo/deps/clog/include -I/Users/gw/repos/pytorch/third_party/NNPACK/include -I/Users/gw/repos/pytorch/third_party/fbgemm/include -I/Users/gw/repos/pytorch/third_party/fbgemm -I/Users/gw/repos/pytorch/third_party/fbgemm/third_party/asmjit/src -I/Users/gw/repos/pytorch/third_party/ittapi/src/ittnotify -I/Users/gw/repos/pytorch/third_party/FP16/include -I/Users/gw/repos/pytorch/third_party/fmt/include -I/Users/gw/repos/pytorch/build/third_party/ideep/mkl-dnn/third_party/oneDNN/include -I/Users/gw/repos/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/src/../include -I/Users/gw/repos/pytorch/third_party/flatbuffers/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/googletest/googletest/include -isystem /Users/gw/repos/pytorch/third_party/protobuf/src -isystem /Users/gw/miniconda2/envs/torch_conda_gpu/include -isystem /Users/gw/repos/pytorch/third_party/gemmlowp -isystem /Users/gw/repos/pytorch/third_party/neon2sse -isystem /Users/gw/repos/pytorch/third_party/XNNPACK/include -isystem /Users/gw/repos/pytorch/third_party/ittapi/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/eigen -isystem /Users/gw/repos/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/include -isystem /Users/gw/repos/pytorch/third_party/ideep/include -isystem /Users/gw/repos/pytorch/build/include -Wno-deprecated -fvisibility-inlines-hidden -Wno-deprecated-declarations -DUSE_PTHREADPOOL -Xpreprocessor -fopenmp -I/Users/gw/miniconda2/envs/torch_conda_gpu/include -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-range-loop-analysis -Wno-pass-failed -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -Wconstant-conversion -Wno-invalid-partial-specialization -Wno-typedef-redefinition -Wno-unknown-warning-option -Wno-unused-private-field -Wno-inconsistent-missing-override -Wno-aligned-allocation-unavailable -Wno-c++14-extensions -Wno-constexpr-not-const -Wno-missing-braces -Qunused-arguments -fcolor-diagnostics -faligned-new -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-unused-private-field -Wno-missing-braces -Wno-c++14-extensions -Wno-constexpr-not-const -DHAVE_AVX512_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION -O3 -DNDEBUG -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.9 -fPIC -DTH_HAVE_THREAD -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-missing-field-initializers -Wno-write-strings -Wno-unknown-pragmas -Wno-type-limits -Wno-array-bounds -Wno-sign-compare -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-missing-braces -Wno-range-loop-analysis -fvisibility=hidden -O2 -Xpreprocessor -fopenmp -I/Users/gw/miniconda2/envs/torch_conda_gpu/include -DCAFFE2_BUILD_MAIN_LIB -DASMJIT_STATIC -std=gnu++14 -O3  -mavx512f -mavx512bw -mavx512vl -mavx512dq -mfma -DCPU_CAPABILITY=AVX512 -DCPU_CAPABILITY_AVX512 -MD -MT caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.AVX512.cpp.o -MF caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.AVX512.cpp.o.d -o caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.AVX512.cpp.o -c /Users/gw/repos/pytorch/build/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.AVX512.cpp
In file included from /Users/gw/repos/pytorch/build/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.AVX512.cpp:1:
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp:59:37: error: no matching function for call to 'isnan'
              if ((val > maxval) || std::isnan(val)) {
                                    ^~~~~~~~~~
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp:442:11: note: in instantiation of function template specialization 'at::native::(anonymous namespace)::cpu_adaptive_max_pool<c10::BFloat16, float>' requested here
          cpu_adaptive_max_pool<BFloat16, /*accscalar_t*/float>(output, indices, input, output_size);
          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:505:1: note: candidate template ignored: requirement 'std::is_floating_point<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1 __lcpp_x) _NOEXCEPT
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:513:1: note: candidate template ignored: requirement 'std::is_integral<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1) _NOEXCEPT
^
In file included from /Users/gw/repos/pytorch/build/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp.AVX512.cpp:1:
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp:59:37: error: no matching function for call to 'isnan'
              if ((val > maxval) || std::isnan(val)) {
                                    ^~~~~~~~~~
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp:444:11: note: in instantiation of function template specialization 'at::native::(anonymous namespace)::cpu_adaptive_max_pool<c10::BFloat16, c10::BFloat16>' requested here
          cpu_adaptive_max_pool<scalar_t, scalar_t>(output, indices, input, output_size);
          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:505:1: note: candidate template ignored: requirement 'std::is_floating_point<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1 __lcpp_x) _NOEXCEPT
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:513:1: note: candidate template ignored: requirement 'std::is_integral<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1) _NOEXCEPT
^
2 errors generated.
[9/78] Building CXX object caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPoolKernel.cpp.AVX512.cpp.o
FAILED: caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPoolKernel.cpp.AVX512.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -DAT_PER_OPERATOR_HEADERS -DCPUINFO_SUPPORTED_PLATFORM=1 -DFMT_HEADER_ONLY=1 -DFXDIV_USE_INLINE_ASSEMBLY=0 -DHAVE_MMAP=1 -DHAVE_SHM_OPEN=1 -DHAVE_SHM_UNLINK=1 -DIDEEP_USE_MKL -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS -DNNP_CONVOLUTION_ONLY=0 -DNNP_INFERENCE_ONLY=0 -DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DUSE_EXTERNAL_MZCRC -D_FILE_OFFSET_BITS=64 -Dtorch_cpu_EXPORTS -I/Users/gw/repos/pytorch/build/aten/src -I/Users/gw/repos/pytorch/aten/src -I/Users/gw/repos/pytorch/build -I/Users/gw/repos/pytorch -I/Users/gw/repos/pytorch/cmake/../third_party/benchmark/include -I/Users/gw/repos/pytorch/third_party/onnx -I/Users/gw/repos/pytorch/build/third_party/onnx -I/Users/gw/repos/pytorch/third_party/foxi -I/Users/gw/repos/pytorch/build/third_party/foxi -I/Users/gw/repos/pytorch/torch/csrc/api -I/Users/gw/repos/pytorch/torch/csrc/api/include -I/Users/gw/repos/pytorch/caffe2/aten/src/TH -I/Users/gw/repos/pytorch/build/caffe2/aten/src/TH -I/Users/gw/repos/pytorch/build/caffe2/aten/src -I/Users/gw/repos/pytorch/build/caffe2/../aten/src -I/Users/gw/repos/pytorch/torch/csrc -I/Users/gw/repos/pytorch/third_party/miniz-2.1.0 -I/Users/gw/repos/pytorch/third_party/kineto/libkineto/include -I/Users/gw/repos/pytorch/third_party/kineto/libkineto/src -I/Users/gw/repos/pytorch/torch/csrc/distributed -I/Users/gw/repos/pytorch/aten/../third_party/catch/single_include -I/Users/gw/repos/pytorch/aten/src/ATen/.. -I/Users/gw/repos/pytorch/third_party/FXdiv/include -I/Users/gw/repos/pytorch/c10/.. -I/Users/gw/repos/pytorch/third_party/pthreadpool/include -I/Users/gw/repos/pytorch/third_party/cpuinfo/include -I/Users/gw/repos/pytorch/third_party/QNNPACK/include -I/Users/gw/repos/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/include -I/Users/gw/repos/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/src -I/Users/gw/repos/pytorch/third_party/cpuinfo/deps/clog/include -I/Users/gw/repos/pytorch/third_party/NNPACK/include -I/Users/gw/repos/pytorch/third_party/fbgemm/include -I/Users/gw/repos/pytorch/third_party/fbgemm -I/Users/gw/repos/pytorch/third_party/fbgemm/third_party/asmjit/src -I/Users/gw/repos/pytorch/third_party/ittapi/src/ittnotify -I/Users/gw/repos/pytorch/third_party/FP16/include -I/Users/gw/repos/pytorch/third_party/fmt/include -I/Users/gw/repos/pytorch/build/third_party/ideep/mkl-dnn/third_party/oneDNN/include -I/Users/gw/repos/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/src/../include -I/Users/gw/repos/pytorch/third_party/flatbuffers/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/googletest/googletest/include -isystem /Users/gw/repos/pytorch/third_party/protobuf/src -isystem /Users/gw/miniconda2/envs/torch_conda_gpu/include -isystem /Users/gw/repos/pytorch/third_party/gemmlowp -isystem /Users/gw/repos/pytorch/third_party/neon2sse -isystem /Users/gw/repos/pytorch/third_party/XNNPACK/include -isystem /Users/gw/repos/pytorch/third_party/ittapi/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/eigen -isystem /Users/gw/repos/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/include -isystem /Users/gw/repos/pytorch/third_party/ideep/include -isystem /Users/gw/repos/pytorch/build/include -Wno-deprecated -fvisibility-inlines-hidden -Wno-deprecated-declarations -DUSE_PTHREADPOOL -Xpreprocessor -fopenmp -I/Users/gw/miniconda2/envs/torch_conda_gpu/include -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-range-loop-analysis -Wno-pass-failed -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -Wconstant-conversion -Wno-invalid-partial-specialization -Wno-typedef-redefinition -Wno-unknown-warning-option -Wno-unused-private-field -Wno-inconsistent-missing-override -Wno-aligned-allocation-unavailable -Wno-c++14-extensions -Wno-constexpr-not-const -Wno-missing-braces -Qunused-arguments -fcolor-diagnostics -faligned-new -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-unused-private-field -Wno-missing-braces -Wno-c++14-extensions -Wno-constexpr-not-const -DHAVE_AVX512_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION -O3 -DNDEBUG -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.9 -fPIC -DTH_HAVE_THREAD -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-missing-field-initializers -Wno-write-strings -Wno-unknown-pragmas -Wno-type-limits -Wno-array-bounds -Wno-sign-compare -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-missing-braces -Wno-range-loop-analysis -fvisibility=hidden -O2 -Xpreprocessor -fopenmp -I/Users/gw/miniconda2/envs/torch_conda_gpu/include -DCAFFE2_BUILD_MAIN_LIB -DASMJIT_STATIC -std=gnu++14 -O3  -mavx512f -mavx512bw -mavx512vl -mavx512dq -mfma -DCPU_CAPABILITY=AVX512 -DCPU_CAPABILITY_AVX512 -MD -MT caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPoolKernel.cpp.AVX512.cpp.o -MF caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPoolKernel.cpp.AVX512.cpp.o.d -o caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/cpu/MaxPoolKernel.cpp.AVX512.cpp.o -c /Users/gw/repos/pytorch/build/aten/src/ATen/native/cpu/MaxPoolKernel.cpp.AVX512.cpp
In file included from /Users/gw/repos/pytorch/build/aten/src/ATen/native/cpu/MaxPoolKernel.cpp.AVX512.cpp:1:
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/MaxPoolKernel.cpp:67:33: error: no matching function for call to 'isnan'
          if ((val > maxval) || std::isnan(val)) {
                                ^~~~~~~~~~
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/MaxPoolKernel.cpp:468:11: note: in instantiation of function template specialization 'at::native::(anonymous namespace)::cpu_max_pool<c10::BFloat16, c10::BFloat16>' requested here
          cpu_max_pool<scalar_t, scalar_t>(output, indices, input, kW, kH, dW, dH, padW, padH, dilationW, dilationH);
          ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:505:1: note: candidate template ignored: requirement 'std::is_floating_point<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1 __lcpp_x) _NOEXCEPT
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:513:1: note: candidate template ignored: requirement 'std::is_integral<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1) _NOEXCEPT
^
1 error generated.
[10/78] Building CXX object caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/ReduceOps.cpp.o
FAILED: caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/ReduceOps.cpp.o
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -DAT_PER_OPERATOR_HEADERS -DCPUINFO_SUPPORTED_PLATFORM=1 -DFMT_HEADER_ONLY=1 -DFXDIV_USE_INLINE_ASSEMBLY=0 -DHAVE_MMAP=1 -DHAVE_SHM_OPEN=1 -DHAVE_SHM_UNLINK=1 -DIDEEP_USE_MKL -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS -DNNP_CONVOLUTION_ONLY=0 -DNNP_INFERENCE_ONLY=0 -DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DUSE_EXTERNAL_MZCRC -D_FILE_OFFSET_BITS=64 -Dtorch_cpu_EXPORTS -I/Users/gw/repos/pytorch/build/aten/src -I/Users/gw/repos/pytorch/aten/src -I/Users/gw/repos/pytorch/build -I/Users/gw/repos/pytorch -I/Users/gw/repos/pytorch/cmake/../third_party/benchmark/include -I/Users/gw/repos/pytorch/third_party/onnx -I/Users/gw/repos/pytorch/build/third_party/onnx -I/Users/gw/repos/pytorch/third_party/foxi -I/Users/gw/repos/pytorch/build/third_party/foxi -I/Users/gw/repos/pytorch/torch/csrc/api -I/Users/gw/repos/pytorch/torch/csrc/api/include -I/Users/gw/repos/pytorch/caffe2/aten/src/TH -I/Users/gw/repos/pytorch/build/caffe2/aten/src/TH -I/Users/gw/repos/pytorch/build/caffe2/aten/src -I/Users/gw/repos/pytorch/build/caffe2/../aten/src -I/Users/gw/repos/pytorch/torch/csrc -I/Users/gw/repos/pytorch/third_party/miniz-2.1.0 -I/Users/gw/repos/pytorch/third_party/kineto/libkineto/include -I/Users/gw/repos/pytorch/third_party/kineto/libkineto/src -I/Users/gw/repos/pytorch/torch/csrc/distributed -I/Users/gw/repos/pytorch/aten/../third_party/catch/single_include -I/Users/gw/repos/pytorch/aten/src/ATen/.. -I/Users/gw/repos/pytorch/third_party/FXdiv/include -I/Users/gw/repos/pytorch/c10/.. -I/Users/gw/repos/pytorch/third_party/pthreadpool/include -I/Users/gw/repos/pytorch/third_party/cpuinfo/include -I/Users/gw/repos/pytorch/third_party/QNNPACK/include -I/Users/gw/repos/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/include -I/Users/gw/repos/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/src -I/Users/gw/repos/pytorch/third_party/cpuinfo/deps/clog/include -I/Users/gw/repos/pytorch/third_party/NNPACK/include -I/Users/gw/repos/pytorch/third_party/fbgemm/include -I/Users/gw/repos/pytorch/third_party/fbgemm -I/Users/gw/repos/pytorch/third_party/fbgemm/third_party/asmjit/src -I/Users/gw/repos/pytorch/third_party/ittapi/src/ittnotify -I/Users/gw/repos/pytorch/third_party/FP16/include -I/Users/gw/repos/pytorch/third_party/fmt/include -I/Users/gw/repos/pytorch/build/third_party/ideep/mkl-dnn/third_party/oneDNN/include -I/Users/gw/repos/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/src/../include -I/Users/gw/repos/pytorch/third_party/flatbuffers/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/googletest/googletest/include -isystem /Users/gw/repos/pytorch/third_party/protobuf/src -isystem /Users/gw/miniconda2/envs/torch_conda_gpu/include -isystem /Users/gw/repos/pytorch/third_party/gemmlowp -isystem /Users/gw/repos/pytorch/third_party/neon2sse -isystem /Users/gw/repos/pytorch/third_party/XNNPACK/include -isystem /Users/gw/repos/pytorch/third_party/ittapi/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/eigen -isystem /Users/gw/repos/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/include -isystem /Users/gw/repos/pytorch/third_party/ideep/include -isystem /Users/gw/repos/pytorch/build/include -Wno-deprecated -fvisibility-inlines-hidden -Wno-deprecated-declarations -DUSE_PTHREADPOOL -Xpreprocessor -fopenmp -I/Users/gw/miniconda2/envs/torch_conda_gpu/include -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-range-loop-analysis -Wno-pass-failed -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -Wconstant-conversion -Wno-invalid-partial-specialization -Wno-typedef-redefinition -Wno-unknown-warning-option -Wno-unused-private-field -Wno-inconsistent-missing-override -Wno-aligned-allocation-unavailable -Wno-c++14-extensions -Wno-constexpr-not-const -Wno-missing-braces -Qunused-arguments -fcolor-diagnostics -faligned-new -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-unused-private-field -Wno-missing-braces -Wno-c++14-extensions -Wno-constexpr-not-const -DHAVE_AVX512_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION -O3 -DNDEBUG -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.9 -fPIC -DTH_HAVE_THREAD -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-missing-field-initializers -Wno-write-strings -Wno-unknown-pragmas -Wno-type-limits -Wno-array-bounds -Wno-sign-compare -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-missing-braces -Wno-range-loop-analysis -fvisibility=hidden -O2 -Xpreprocessor -fopenmp -I/Users/gw/miniconda2/envs/torch_conda_gpu/include -DCAFFE2_BUILD_MAIN_LIB -DASMJIT_STATIC -std=gnu++14 -MD -MT caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/ReduceOps.cpp.o -MF caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/ReduceOps.cpp.o.d -o caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/ReduceOps.cpp.o -c /Users/gw/repos/pytorch/aten/src/ATen/native/ReduceOps.cpp
/Users/gw/repos/pytorch/aten/src/ATen/native/ReduceOps.cpp:662:10: error: no matching function for call to 'isnan'
  return std::isnan(x);
         ^~~~~~~~~~
/Users/gw/repos/pytorch/aten/src/ATen/native/ReduceOps.cpp:675:12: note: in instantiation of function template specialization 'at::native::(anonymous namespace)::isnan_<c10::BFloat16>' requested here
        if(isnan_(curr_elem) || (!isnan_(out) && op(curr_elem, out))) {
           ^
/Users/gw/repos/pytorch/aten/src/ATen/native/ReduceOps.cpp:688:84: note: in instantiation of function template specialization 'at::native::cummax_cummin_helper<c10::BFloat16, long long, std::__1::greater_equal<c10::BFloat16> >' requested here
      at::native::tensor_dim_apply3<scalar_t, int64_t>(self, values, indices, dim, cummax_cummin_helper<scalar_t, int64_t, std::greater_equal<scalar_t>>);
                                                                                   ^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:505:1: note: candidate template ignored: requirement 'std::is_floating_point<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1 __lcpp_x) _NOEXCEPT
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/include/c++/v1/math.h:513:1: note: candidate template ignored: requirement 'std::is_integral<BFloat16>::value' was not satisfied [with _A1 = c10::BFloat16]
isnan(_A1) _NOEXCEPT
^
/Users/gw/repos/pytorch/aten/src/ATen/native/ReduceOps.cpp:675:12: error: no matching function for call to 'isnan_'
        if(isnan_(curr_elem) || (!isnan_(out) && op(curr_elem, out))) {
           ^~~~~~
/Users/gw/repos/pytorch/aten/src/ATen/native/ReduceOps.cpp:723:84: note: in instantiation of function template specialization 'at::native::cummax_cummin_helper<c10::BFloat16, long long, std::__1::less_equal<c10::BFloat16> >' requested here
      at::native::tensor_dim_apply3<scalar_t, int64_t>(self, values, indices, dim, cummax_cummin_helper<scalar_t, int64_t, std::less_equal<scalar_t>>);
                                                                                   ^
/Users/gw/repos/pytorch/aten/src/ATen/native/ReduceOps.cpp:661:13: note: candidate template ignored: substitution failure [with T = c10::BFloat16]
inline bool isnan_(T x) {
            ^
2 errors generated.
ninja: build stopped: subcommand failed.

@geoffwoollard
Copy link

geoffwoollard commented Aug 18, 2022

The above error message has notes the line that FAILED. I can use all the same flags, and change the file compiling to have isnan in it from math.h and it compiles fine.

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang++ -DAT_PER_OPERATOR_HEADERS -DCPUINFO_SUPPORTED_PLATFORM=1 -DFMT_HEADER_ONLY=1 -DFXDIV_USE_INLINE_ASSEMBLY=0 -DHAVE_MMAP=1 -DHAVE_SHM_OPEN=1 -DHAVE_SHM_UNLINK=1 -DIDEEP_USE_MKL -DMINIZ_DISABLE_ZIP_READER_CRC32_CHECKS -DNNP_CONVOLUTION_ONLY=0 -DNNP_INFERENCE_ONLY=0 -DONNXIFI_ENABLE_EXT=1 -DONNX_ML=1 -DONNX_NAMESPACE=onnx_torch -DUSE_EXTERNAL_MZCRC -D_FILE_OFFSET_BITS=64 -Dtorch_cpu_EXPORTS -I/Users/gw/repos/pytorch/build/aten/src -I/Users/gw/repos/pytorch/aten/src -I/Users/gw/repos/pytorch/build -I/Users/gw/repos/pytorch -I/Users/gw/repos/pytorch/cmake/../third_party/benchmark/include -I/Users/gw/repos/pytorch/third_party/onnx -I/Users/gw/repos/pytorch/build/third_party/onnx -I/Users/gw/repos/pytorch/third_party/foxi -I/Users/gw/repos/pytorch/build/third_party/foxi -I/Users/gw/repos/pytorch/torch/csrc/api -I/Users/gw/repos/pytorch/torch/csrc/api/include -I/Users/gw/repos/pytorch/caffe2/aten/src/TH -I/Users/gw/repos/pytorch/build/caffe2/aten/src/TH -I/Users/gw/repos/pytorch/build/caffe2/aten/src -I/Users/gw/repos/pytorch/build/caffe2/../aten/src -I/Users/gw/repos/pytorch/torch/csrc -I/Users/gw/repos/pytorch/third_party/miniz-2.1.0 -I/Users/gw/repos/pytorch/third_party/kineto/libkineto/include -I/Users/gw/repos/pytorch/third_party/kineto/libkineto/src -I/Users/gw/repos/pytorch/torch/csrc/distributed -I/Users/gw/repos/pytorch/aten/../third_party/catch/single_include -I/Users/gw/repos/pytorch/aten/src/ATen/.. -I/Users/gw/repos/pytorch/third_party/FXdiv/include -I/Users/gw/repos/pytorch/c10/.. -I/Users/gw/repos/pytorch/third_party/pthreadpool/include -I/Users/gw/repos/pytorch/third_party/cpuinfo/include -I/Users/gw/repos/pytorch/third_party/QNNPACK/include -I/Users/gw/repos/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/include -I/Users/gw/repos/pytorch/aten/src/ATen/native/quantized/cpu/qnnpack/src -I/Users/gw/repos/pytorch/third_party/cpuinfo/deps/clog/include -I/Users/gw/repos/pytorch/third_party/NNPACK/include -I/Users/gw/repos/pytorch/third_party/fbgemm/include -I/Users/gw/repos/pytorch/third_party/fbgemm -I/Users/gw/repos/pytorch/third_party/fbgemm/third_party/asmjit/src -I/Users/gw/repos/pytorch/third_party/ittapi/src/ittnotify -I/Users/gw/repos/pytorch/third_party/FP16/include -I/Users/gw/repos/pytorch/third_party/fmt/include -I/Users/gw/repos/pytorch/build/third_party/ideep/mkl-dnn/third_party/oneDNN/include -I/Users/gw/repos/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/src/../include -I/Users/gw/repos/pytorch/third_party/flatbuffers/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/googletest/googlemock/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/googletest/googletest/include -isystem /Users/gw/repos/pytorch/third_party/protobuf/src -isystem /Users/gw/miniconda2/envs/torch_conda_gpu/include -isystem /Users/gw/repos/pytorch/third_party/gemmlowp -isystem /Users/gw/repos/pytorch/third_party/neon2sse -isystem /Users/gw/repos/pytorch/third_party/XNNPACK/include -isystem /Users/gw/repos/pytorch/third_party/ittapi/include -isystem /Users/gw/repos/pytorch/cmake/../third_party/eigen -isystem /Users/gw/repos/pytorch/third_party/ideep/mkl-dnn/third_party/oneDNN/include -isystem /Users/gw/repos/pytorch/third_party/ideep/include -isystem /Users/gw/repos/pytorch/build/include -Wno-deprecated -fvisibility-inlines-hidden -Wno-deprecated-declarations -DUSE_PTHREADPOOL -Xpreprocessor -fopenmp -I/Users/gw/miniconda2/envs/torch_conda_gpu/include -DNDEBUG -DUSE_KINETO -DLIBKINETO_NOCUPTI -DUSE_FBGEMM -DUSE_QNNPACK -DUSE_PYTORCH_QNNPACK -DUSE_XNNPACK -DSYMBOLICATE_MOBILE_DEBUG_HANDLE -DEDGE_PROFILER_USE_KINETO -O2 -fPIC -Wno-narrowing -Wall -Wextra -Werror=return-type -Werror=non-virtual-dtor -Wno-missing-field-initializers -Wno-type-limits -Wno-array-bounds -Wno-unknown-pragmas -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-range-loop-analysis -Wno-pass-failed -Wno-error=pedantic -Wno-error=redundant-decls -Wno-error=old-style-cast -Wconstant-conversion -Wno-invalid-partial-specialization -Wno-typedef-redefinition -Wno-unknown-warning-option -Wno-unused-private-field -Wno-inconsistent-missing-override -Wno-aligned-allocation-unavailable -Wno-c++14-extensions -Wno-constexpr-not-const -Wno-missing-braces -Qunused-arguments -fcolor-diagnostics -faligned-new -fno-math-errno -fno-trapping-math -Werror=format -Werror=cast-function-type -Wno-unused-private-field -Wno-missing-braces -Wno-c++14-extensions -Wno-constexpr-not-const -DHAVE_AVX512_CPU_DEFINITION -DHAVE_AVX2_CPU_DEFINITION -O3 -DNDEBUG -DNDEBUG -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.14.sdk -mmacosx-version-min=10.9 -fPIC -DTH_HAVE_THREAD -Wall -Wextra -Wno-unused-parameter -Wno-unused-function -Wno-unused-result -Wno-unused-local-typedefs -Wno-missing-field-initializers -Wno-write-strings -Wno-unknown-pragmas -Wno-type-limits -Wno-array-bounds -Wno-sign-compare -Wno-strict-overflow -Wno-strict-aliasing -Wno-error=deprecated-declarations -Wno-missing-braces -Wno-range-loop-analysis -fvisibility=hidden -O2 -Xpreprocessor -fopenmp -I/Users/gw/miniconda2/envs/torch_conda_gpu/include -DCAFFE2_BUILD_MAIN_LIB -DASMJIT_STATIC -std=gnu++14 -MD -MT caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/ReduceOps.cpp.o -MF caffe2/CMakeFiles/torch_cpu.dir/__/aten/src/ATen/native/ReduceOps.cpp.o.d -o math ~/developer/math.c

where ~/developer/math.c has isnan in it:

#include<math.h>
#include<stdio.h>

int main(){

  printf("Hello World!\n");

  int n1=0, n2=0, sum=0;
  sum = n1 + n2;
  printf("%d + %d = %d\n", n1, n2, sum);

  float neg_sqrt=0.0;
  neg_sqrt = sqrt(-1*sqrt(sum*sum));
  printf("sqrt(|sum|)=%f\n", neg_sqrt);

  float div_zero=0.0;
  div_zero = 1.0 / 0;
  printf("div_zero=%f\n", div_zero);

  printf("isnan(neg_sqrt)=%d, isnan(div_zero)=%d\n", isnan(neg_sqrt), isnan(div_zero));

  return 0;
}

So I'm not sure where _isnan is coming from, and why isnan in /Users/gw/repos/pytorch/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp is causing problems.

Can I add any command line flag and resolve this?

@geoffwoollard
Copy link

I added #include <math.h> in
/Users/gw/repos/pytorch/aten/src/ATen/native/ReduceOps.cpp
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/MaxPoolKernel.cpp
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/MaxPooling.cpp
/Users/gw/repos/pytorch/aten/src/ATen/native/cpu/AdaptiveMaxPoolKernel.cpp

But I'm still getting the same error messages:

/Users/gw/repos/pytorch/aten/src/ATen/native/ReduceOps.cpp:663:10: error: no matching function for call to 'isnan'

@geoffwoollard
Copy link

@brokeyourbike, what versions of the dependencies and what version of Python did you use? Can you capture your exact environment in pip or conda? Can you share the result of conda list --explicit?

@brokeyourbike
Copy link
Author

Hi @geoffwoollard I have performed this setup more then a year ago and now I don't have it installed anymore. A lot of things chnanged in my setup over the years. Unfortunately I cannot share the result of conda list --explicit

@geoffwoollard
Copy link

Do you still have the pytorch/build directory? It has informative log files like pytorch/build/CMakeFiles/CMakeError.log and pytorch/build/CMakeFiles/CMakeOutput.log

@geoffwoollard
Copy link

Also, I'm getting different errors depending on what PyTorch version (commit) I try to install, and what version of Python (3.7, ..., 3.10) I use.

@brokeyourbike
Copy link
Author

@geoffwoollard nah, sorry, don't have PyTorch installed right now, latest macOS versions don't support Nvidia GPU

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment