From 3c73229916787bfb7e0ab9549d2fb877b20729bd Mon Sep 17 00:00:00 2001 From: Rahul Garg Date: Sun, 18 Jun 2017 12:31:31 +0530 Subject: [PATCH] Abort device function in HIP/HCC, need new HCC Change-Id: I4195ab75e9b7b48c8b8128d6925ddc0fa5e9e009 --- include/hip/hcc_detail/hip_runtime.h | 3 +++ src/device_util.cpp | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/include/hip/hcc_detail/hip_runtime.h b/include/hip/hcc_detail/hip_runtime.h index 95826f9b60..da3b7ba50e 100644 --- a/include/hip/hcc_detail/hip_runtime.h +++ b/include/hip/hcc_detail/hip_runtime.h @@ -174,6 +174,9 @@ static constexpr int warpSize = 64; __device__ long long int clock64(); __device__ clock_t clock(); +//abort +__device__ void abort(); + //atomicAdd() __device__ int atomicAdd(int* address, int val); __device__ unsigned int atomicAdd(unsigned int* address, diff --git a/src/device_util.cpp b/src/device_util.cpp index 062372f0f4..1efda02933 100644 --- a/src/device_util.cpp +++ b/src/device_util.cpp @@ -839,6 +839,11 @@ __device__ float __hip_ynf(int n, float x) __device__ long long int clock64() { return (long long int)hc::__cycle_u64(); }; __device__ clock_t clock() { return (clock_t)hc::__cycle_u64(); }; +//abort +__device__ void abort() +{ + return hc::abort(); +} //atomicAdd() __device__ int atomicAdd(int* address, int val)