Remove hip-hcc codes: Part three
1.Rename include/hip/hcc_detail/ as include/hip/amd_detail/
2.Rename include/hip/nvcc_detail/ as include/hip/nvidia_detail/
3.Create __HIP_PLATFORM_AMD__ to replace __HIP_PLATFORM_HCC__
4.Create __HIP_PLATFORM_NVIDIA__ to replace __HIP_PLATFORM_NVCC__
After hcc_detail, nvcc_detail, __HIP_PLATFORM_HCC__ and __HIP_PLATFORM_NVCC__
have been removed from upstream, they will be removed from hip runtime.
Change-Id: I1ae457effd739d6c25bca203c1724b026be21fce
[ROCm/hip commit: c2adc70d4d]
This commit is contained in:
@@ -21,7 +21,7 @@ THE SOFTWARE.
|
||||
#include <iostream>
|
||||
#include "hip/hip_runtime.h"
|
||||
#include "hip/hip_runtime_api.h"
|
||||
#include "hip/hcc_detail/hip_complex.h"
|
||||
#include "hip/amd_detail/hip_complex.h"
|
||||
|
||||
#define LEN 64
|
||||
#define SIZE 64 << 2
|
||||
|
||||
@@ -102,7 +102,7 @@ __host__ void double_precision_math_functions() {
|
||||
nearbyint(0.0);
|
||||
// nextafter(0.0);
|
||||
fX = 1.0; // norm(1, &fX);
|
||||
#if defined(__HIP_PLATFORM_HCC__)
|
||||
#if defined(__HIP_PLATFORM_AMD__)
|
||||
// norm3d(1.0, 0.0, 0.0);
|
||||
// norm4d(1.0, 0.0, 0.0, 0.0);
|
||||
#endif
|
||||
@@ -113,11 +113,11 @@ __host__ void double_precision_math_functions() {
|
||||
|
||||
remainder(2.0, 1.0);
|
||||
remquo(1.0, 2.0, &iX);
|
||||
#if defined(__HIP_PLATFORM_HCC__)
|
||||
#if defined(__HIP_PLATFORM_AMD__)
|
||||
// rhypot(0.0, 1.0);
|
||||
#endif
|
||||
rint(1.0);
|
||||
#if defined(__HIP_PLATFORM_HCC__)
|
||||
#if defined(__HIP_PLATFORM_AMD__)
|
||||
fX = 1.0; // rnorm(1, &fX);
|
||||
// rnorm3d(0.0, 0.0, 1.0);
|
||||
// rnorm4d(0.0, 0.0, 0.0, 1.0);
|
||||
|
||||
@@ -66,7 +66,7 @@ __host__ void single_precision_math_functions() {
|
||||
expm1f(0.0f);
|
||||
fabsf(1.0f);
|
||||
fdimf(1.0f, 0.0f);
|
||||
#if defined(__HIP_PLATFORM_HCC__)
|
||||
#if defined(__HIP_PLATFORM_AMD__)
|
||||
// fdividef(0.0f, 1.0f);
|
||||
#endif
|
||||
floorf(0.0f);
|
||||
@@ -100,7 +100,7 @@ __host__ void single_precision_math_functions() {
|
||||
nanf("1");
|
||||
nearbyintf(0.0f);
|
||||
// nextafterf(0.0f);
|
||||
#if defined(__HIP_PLATFORM_HCC__)
|
||||
#if defined(__HIP_PLATFORM_AMD__)
|
||||
// norm3df(1.0f, 0.0f, 0.0f);
|
||||
// norm4df(1.0f, 0.0f, 0.0f, 0.0f);
|
||||
#endif
|
||||
@@ -111,11 +111,11 @@ __host__ void single_precision_math_functions() {
|
||||
// rcbrtf(1.0f);
|
||||
remainderf(2.0f, 1.0f);
|
||||
remquof(1.0f, 2.0f, &iX);
|
||||
#if defined(__HIP_PLATFORM_HCC__)
|
||||
#if defined(__HIP_PLATFORM_AMD__)
|
||||
// rhypotf(0.0f, 1.0f);
|
||||
#endif
|
||||
rintf(1.0f);
|
||||
#if defined(__HIP_PLATFORM_HCC__)
|
||||
#if defined(__HIP_PLATFORM_AMD__)
|
||||
// rnorm3df(0.0f, 0.0f, 1.0f);
|
||||
// rnorm4df(0.0f, 0.0f, 0.0f, 1.0f);
|
||||
fX = 1.0f; // rnormf(1, &fX);
|
||||
|
||||
@@ -34,7 +34,7 @@ __global__ void gpu_ballot(unsigned int* device_ballot, int Num_Warps_per_Block,
|
||||
int pshift) {
|
||||
int tid = threadIdx.x + blockIdx.x * blockDim.x;
|
||||
const unsigned int warp_num = threadIdx.x >> pshift;
|
||||
#ifdef __HIP_PLATFORM_HCC__
|
||||
#ifdef __HIP_PLATFORM_AMD__
|
||||
atomicAdd(&device_ballot[warp_num + blockIdx.x * Num_Warps_per_Block],
|
||||
__popcll(__ballot(tid - 245)));
|
||||
#else
|
||||
|
||||
@@ -35,7 +35,7 @@ THE SOFTWARE.
|
||||
#include "hip/hip_vector_types.h"
|
||||
#include "test_common.h"
|
||||
|
||||
#if (__hcc_workweek__ >= 16164) || defined(__HIP_PLATFORM_NVCC__) || defined(__HIP_CLANG_ONLY__)
|
||||
#if (__hcc_workweek__ >= 16164) || defined(__HIP_PLATFORM_NVIDIA__) || defined(__HIP_CLANG_ONLY__)
|
||||
|
||||
#define HIP_ASSERT(x) (assert((x) == hipSuccess))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user