[nvccWarnings] Fix warnings seen with dtests on nvcc path
[ROCm/clr commit: 0ac125e3db]
This commit is contained in:
committed by
Phaneendr-kumar Lanka
parent
3317761c7a
commit
033e2cde33
@@ -29,7 +29,7 @@ __global__ void set(hipLaunchParm lp, uint32_t *ptr, uint8_t val, size_t size)
|
|||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
uint32_t *A, *Ad, *B, *Bd;
|
uint32_t *A, *Ad, *B, *Bd;
|
||||||
uint32_t *Val, *Vald;
|
uint32_t *Val;
|
||||||
A = new uint32_t[LEN];
|
A = new uint32_t[LEN];
|
||||||
B = new uint32_t[LEN];
|
B = new uint32_t[LEN];
|
||||||
Val = new uint32_t;
|
Val = new uint32_t;
|
||||||
|
|||||||
@@ -55,7 +55,7 @@ __global__ void floatMath(hipLaunchParm lp, float *In, float *Out) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
int main(){
|
int main(){
|
||||||
float *Inh, *Outh, *Ind, *Outd;
|
float *Ind, *Outd;
|
||||||
hipMalloc((void**)&Ind, SIZE);
|
hipMalloc((void**)&Ind, SIZE);
|
||||||
hipMalloc((void**)&Outd, SIZE);
|
hipMalloc((void**)&Outd, SIZE);
|
||||||
hipLaunchKernel(floatMath, dim3(LEN,1,1), dim3(1,1,1), 0, 0, Ind, Outd);
|
hipLaunchKernel(floatMath, dim3(LEN,1,1), dim3(1,1,1), 0, 0, Ind, Outd);
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ THE SOFTWARE.
|
|||||||
|
|
||||||
__global__ void FloatMathPrecise(hipLaunchParm lp)
|
__global__ void FloatMathPrecise(hipLaunchParm lp)
|
||||||
{
|
{
|
||||||
int iX;
|
//int iX; //uncomment this when remqouf() is enabled again
|
||||||
float fX, fY;
|
float fX, fY;
|
||||||
|
|
||||||
acosf(1.0f);
|
acosf(1.0f);
|
||||||
|
|||||||
@@ -287,7 +287,7 @@ void runTest(int argc, char **argv)
|
|||||||
"SM %d.%d compute capabilities\n\n",
|
"SM %d.%d compute capabilities\n\n",
|
||||||
deviceProp.multiProcessorCount, deviceProp.major, deviceProp.minor);
|
deviceProp.multiProcessorCount, deviceProp.major, deviceProp.minor);
|
||||||
|
|
||||||
int version = (deviceProp.major * 0x10 + deviceProp.minor);
|
|
||||||
|
|
||||||
unsigned int numThreads = 256;
|
unsigned int numThreads = 256;
|
||||||
unsigned int numBlocks = 64;
|
unsigned int numBlocks = 64;
|
||||||
|
|||||||
@@ -249,7 +249,6 @@ hipMemcpy(B, Bd, N*sizeof(long long int), hipMemcpyDeviceToHost);
|
|||||||
int passed = 0;
|
int passed = 0;
|
||||||
for(int i=0;i<512;i++){
|
for(int i=0;i<512;i++){
|
||||||
int x = roundf(A[i]);
|
int x = roundf(A[i]);
|
||||||
long long int y = x;
|
|
||||||
if(B[i] == x){
|
if(B[i] == x){
|
||||||
passed = 1;
|
passed = 1;
|
||||||
}
|
}
|
||||||
@@ -283,7 +282,6 @@ hipMemcpy(B, Bd, N*sizeof(long int), hipMemcpyDeviceToHost);
|
|||||||
int passed = 0;
|
int passed = 0;
|
||||||
for(int i=0;i<512;i++){
|
for(int i=0;i<512;i++){
|
||||||
int x = roundf(A[i]);
|
int x = roundf(A[i]);
|
||||||
long int y = x;
|
|
||||||
if(B[i] == x){
|
if(B[i] == x){
|
||||||
passed = 1;
|
passed = 1;
|
||||||
}
|
}
|
||||||
@@ -351,7 +349,6 @@ hipMemcpy(B, Bd, N*sizeof(long long int), hipMemcpyDeviceToHost);
|
|||||||
int passed = 0;
|
int passed = 0;
|
||||||
for(int i=0;i<512;i++){
|
for(int i=0;i<512;i++){
|
||||||
int x = roundf(A[i]);
|
int x = roundf(A[i]);
|
||||||
long long int y = x;
|
|
||||||
if(B[i] == x){
|
if(B[i] == x){
|
||||||
passed = 1;
|
passed = 1;
|
||||||
}
|
}
|
||||||
@@ -385,7 +382,6 @@ hipMemcpy(B, Bd, N*sizeof(long int), hipMemcpyDeviceToHost);
|
|||||||
int passed = 0;
|
int passed = 0;
|
||||||
for(int i=0;i<512;i++){
|
for(int i=0;i<512;i++){
|
||||||
int x = roundf(A[i]);
|
int x = roundf(A[i]);
|
||||||
long int y = x;
|
|
||||||
if(B[i] == x){
|
if(B[i] == x){
|
||||||
passed = 1;
|
passed = 1;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -90,14 +90,6 @@ vectorADD(const hipLaunchParm lp,
|
|||||||
size_t N)
|
size_t N)
|
||||||
{
|
{
|
||||||
// KERNELBEGIN;
|
// KERNELBEGIN;
|
||||||
int ws = warpSize;
|
|
||||||
|
|
||||||
|
|
||||||
int zuzu = deviceVar + 1;
|
|
||||||
|
|
||||||
|
|
||||||
int b = threadIdx.x;
|
|
||||||
int c;
|
|
||||||
#ifdef NOT_YET
|
#ifdef NOT_YET
|
||||||
int a = __shfl_up(x, 1);
|
int a = __shfl_up(x, 1);
|
||||||
#endif
|
#endif
|
||||||
@@ -109,6 +101,10 @@ vectorADD(const hipLaunchParm lp,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __HCC__
|
#ifdef __HCC__
|
||||||
|
|
||||||
|
int b = threadIdx.x;
|
||||||
|
int c;
|
||||||
|
|
||||||
// TODO - move to HIP atomics when ready.
|
// TODO - move to HIP atomics when ready.
|
||||||
concurrency :: atomic_fetch_add(&c, b);
|
concurrency :: atomic_fetch_add(&c, b);
|
||||||
//Concurrency::atomic_add_unsigned (&x, a);
|
//Concurrency::atomic_add_unsigned (&x, a);
|
||||||
|
|||||||
@@ -192,8 +192,6 @@ HostMemory<T>::~HostMemory ()
|
|||||||
free(A_hh);
|
free(A_hh);
|
||||||
free(B_hh);
|
free(B_hh);
|
||||||
}
|
}
|
||||||
T *A_hh = NULL;
|
|
||||||
T *B_hh = NULL;
|
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -32,7 +32,6 @@ THE SOFTWARE.
|
|||||||
|
|
||||||
int main()
|
int main()
|
||||||
{
|
{
|
||||||
hipDevice_t device;
|
|
||||||
size_t Nbytes = N*sizeof(int);
|
size_t Nbytes = N*sizeof(int);
|
||||||
int numDevices = 0;
|
int numDevices = 0;
|
||||||
int *A_d, *B_d, *C_d, *X_d, *Y_d, *Z_d;
|
int *A_d, *B_d, *C_d, *X_d, *Y_d, *Z_d;
|
||||||
|
|||||||
@@ -188,7 +188,6 @@ int main(int argc, char *argv[])
|
|||||||
{
|
{
|
||||||
HipTest::parseStandardArguments(argc, argv, true);
|
HipTest::parseStandardArguments(argc, argv, true);
|
||||||
|
|
||||||
int numElements = N;
|
|
||||||
|
|
||||||
int dev0 = 0;
|
int dev0 = 0;
|
||||||
int dev1 = 1;
|
int dev1 = 1;
|
||||||
|
|||||||
@@ -27,7 +27,10 @@ THE SOFTWARE.
|
|||||||
|
|
||||||
#include "hip/hip_runtime.h"
|
#include "hip/hip_runtime.h"
|
||||||
#include "test_common.h"
|
#include "test_common.h"
|
||||||
|
|
||||||
|
#ifdef __HIP_PLATFORM_HCC__
|
||||||
#define HIPRT_CB
|
#define HIPRT_CB
|
||||||
|
#endif
|
||||||
|
|
||||||
class CallbackClass
|
class CallbackClass
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user