From 9c57c9a8cf55599b653f6f0dde9ceb92be3503f5 Mon Sep 17 00:00:00 2001 From: Johannes M Dieterich Date: Thu, 4 Oct 2018 00:48:07 -0500 Subject: [PATCH] Revert "Fix device function decls (#192)" This reverts commit 0207b3fd902e8c71c55b7037c2861961ba3831a8. --- caffe2/utils/conversions.h | 2 +- caffe2/utils/fixed_divisor.h | 2 +- caffe2/utils/math_utils.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/caffe2/utils/conversions.h b/caffe2/utils/conversions.h index 21e531c3531075..dff700dec7e0c6 100644 --- a/caffe2/utils/conversions.h +++ b/caffe2/utils/conversions.h @@ -11,7 +11,7 @@ #include #endif -#if defined(__CUDA_ARCH__) || defined(__HIP__) +#if defined(__CUDA_ARCH__) || defined(__HIP_DEVICE_COMPILE__) #define CONVERSIONS_DECL __host__ __device__ inline #else #define CONVERSIONS_DECL inline diff --git a/caffe2/utils/fixed_divisor.h b/caffe2/utils/fixed_divisor.h index e0835ebb5fc3b1..5ad189c9faf60e 100644 --- a/caffe2/utils/fixed_divisor.h +++ b/caffe2/utils/fixed_divisor.h @@ -7,7 +7,7 @@ #include #include -#if defined(__CUDA_ARCH__) || defined(__HIP__) +#if defined(__CUDA_ARCH__) || defined(__HIP_ARCH__) #define FIXED_DIVISOR_DECL inline __host__ __device__ #else #define FIXED_DIVISOR_DECL inline diff --git a/caffe2/utils/math_utils.h b/caffe2/utils/math_utils.h index aeff3038c5f7a7..0a59499e31d547 100644 --- a/caffe2/utils/math_utils.h +++ b/caffe2/utils/math_utils.h @@ -3,7 +3,7 @@ #include "caffe2/core/common.h" -#if defined(__CUDA_ARCH__) || defined(__HIP__) +#if defined(__CUDA_ARCH__) || defined(__HIP_DEVICE_COMPILE__) #define MATH_UTILS_DECL inline __host__ __device__ #else #define MATH_UTILS_DECL inline