Unverified Commit 3b2139e2 authored by q.yao's avatar q.yao Committed by GitHub
Browse files

[Fix] Fix build with cuda9.0 (#1525)

* Fix build with cuda9.0

* add note about why do we use torch/types.h
parent 46b2cb37
...@@ -14,7 +14,11 @@ ...@@ -14,7 +14,11 @@
#include <cuda.h> #include <cuda.h>
#include <cuda_runtime.h> #include <cuda_runtime.h>
#include <torch/extension.h> // Using <torch/extension.h> is recommended in the official documentation in
// https://pytorch.org/tutorials/advanced/cpp_extension.html#writing-the-c-op.
// However, we use <torch/types.h> for compatibility with CUDA 9.0
// Read https://github.com/pytorch/extension-cpp/issues/35 for more details.
#include <torch/types.h>
#include <iostream> #include <iostream>
#include <vector> #include <vector>
......
#ifndef PYTORCH_DEVICE_REGISTRY_H #ifndef PYTORCH_DEVICE_REGISTRY_H
#define PYTORCH_DEVICE_REGISTRY_H #define PYTORCH_DEVICE_REGISTRY_H
#include <torch/extension.h> // Using <torch/extension.h> is recommended in the official documentation in
// https://pytorch.org/tutorials/advanced/cpp_extension.html#writing-the-c-op.
// However, we use <torch/types.h> for compatibility with CUDA 9.0
// Read https://github.com/pytorch/extension-cpp/issues/35 for more details.
#include <torch/types.h>
#include <cassert> #include <cassert>
#include <functional> #include <functional>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment