From c82c84949cf1fe757b2dc39ce723c219cac14554 Mon Sep 17 00:00:00 2001 From: "Sun, Peng" Date: Sat, 1 Apr 2017 15:42:53 -0500 Subject: [PATCH] Fix warpSize, for related issue in hipeigen and torch Change-Id: Ic66b24923a363304dca189011869ba7a0a6f8895 --- include/hip/hcc_detail/hip_runtime.h | 3 +-- src/device_util.cpp | 4 ---- 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/include/hip/hcc_detail/hip_runtime.h b/include/hip/hcc_detail/hip_runtime.h index e0375269e7..06ce65bc9a 100644 --- a/include/hip/hcc_detail/hip_runtime.h +++ b/include/hip/hcc_detail/hip_runtime.h @@ -159,8 +159,7 @@ extern int HIP_TRACE_API; // TODO - hipify-clang - change to use the function call. //#define warpSize hc::__wavesize() -extern const int warpSize; - +static constexpr int warpSize = 64; #define clock_t long long int __device__ long long int clock64(); diff --git a/src/device_util.cpp b/src/device_util.cpp index b0df62f43b..8ce53765b5 100644 --- a/src/device_util.cpp +++ b/src/device_util.cpp @@ -835,10 +835,6 @@ __device__ float __hip_ynf(int n, float x) return b0; } - - -const int warpSize = 64; - __device__ long long int clock64() { return (long long int)hc::__cycle_u64(); }; __device__ clock_t clock() { return (clock_t)hc::__cycle_u64(); };