Fix HIP_PATH, CHECK macro in samples.
Tá an tiomantas seo le fáil i:
@@ -1,6 +1,6 @@
|
||||
#Dependencies : [MYHIP]/bin must be in user's path.
|
||||
|
||||
HIP_PATH=?../../..
|
||||
HIP_PATH?=../../..
|
||||
HIP_PLATFORM=$(shell $(HIP_PATH)/bin/hipconfig --platform)
|
||||
HIPCC=$(HIP_PATH)/bin/hipcc
|
||||
|
||||
|
||||
@@ -24,11 +24,14 @@ THE SOFTWARE.
|
||||
#include <hip_runtime.h>
|
||||
|
||||
|
||||
#define CHECK(error) \
|
||||
#define CHECK(cmd) \
|
||||
{\
|
||||
hipError_t error = cmd;\
|
||||
if (error != hipSuccess) { \
|
||||
fprintf(stderr, "error: '%s'(%d) at %s:%d\n", hipGetErrorString(error), error,__FILE__, __LINE__); \
|
||||
exit(EXIT_FAILURE);\
|
||||
}
|
||||
}\
|
||||
}
|
||||
|
||||
void __global__
|
||||
bit_extract_kernel(hipLaunchParm lp, uint32_t *C_d, const uint32_t *A_d, size_t N)
|
||||
|
||||
@@ -22,11 +22,14 @@ THE SOFTWARE.
|
||||
#include <stdio.h>
|
||||
#include <cuda_runtime.h>
|
||||
|
||||
#define CHECK(error) \
|
||||
#define CHECK(cmd) \
|
||||
{\
|
||||
hipError_t error = cmd;\
|
||||
if (error != cudaSuccess) { \
|
||||
fprintf(stderr, "error: '%s'(%d) at %s:%d\n", cudaGetErrorString(error), error,__FILE__, __LINE__); \
|
||||
exit(EXIT_FAILURE);\
|
||||
}
|
||||
}\
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@@ -22,11 +22,14 @@ THE SOFTWARE.
|
||||
#include <stdio.h>
|
||||
#include <hip_runtime.h>
|
||||
|
||||
#define CHECK(error) \
|
||||
#define CHECK(cmd) \
|
||||
{\
|
||||
hipError_t error = cmd;\
|
||||
if (error != hipSuccess) { \
|
||||
fprintf(stderr, "error: '%s'(%d) at %s:%d\n", hipGetErrorString(error), error,__FILE__, __LINE__); \
|
||||
exit(EXIT_FAILURE);\
|
||||
}
|
||||
}\
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir