SWDEV-431064 catch test perf_test target compilation fix
Change-Id: I7de355c0d8ffd60ae05851e94c6e1a08ad655fd8
This commit is contained in:
committato da
Rakesh Roy
parent
be88e1dffc
commit
c5fa5e683f
@@ -282,7 +282,6 @@ set(CMAKE_CXX_EXTENSIONS OFF)
|
||||
|
||||
add_custom_target(build_tests)
|
||||
|
||||
|
||||
# Tests folder
|
||||
add_subdirectory(unit ${CATCH_BUILD_DIR}/unit)
|
||||
add_subdirectory(ABM ${CATCH_BUILD_DIR}/ABM)
|
||||
@@ -290,6 +289,7 @@ add_subdirectory(kernels ${CATCH_BUILD_DIR}/kernels)
|
||||
add_subdirectory(hipTestMain ${CATCH_BUILD_DIR}/hipTestMain)
|
||||
add_subdirectory(stress ${CATCH_BUILD_DIR}/stress)
|
||||
add_subdirectory(TypeQualifiers ${CATCH_BUILD_DIR}/TypeQualifiers)
|
||||
add_subdirectory(perftests ${CATCH_BUILD_DIR}/perftests)
|
||||
add_subdirectory(multiproc ${CATCH_BUILD_DIR}/multiproc)
|
||||
add_subdirectory(performance ${CATCH_BUILD_DIR}/performance)
|
||||
|
||||
|
||||
@@ -229,7 +229,7 @@ TEST_CASE("Perf_hipPerfBufferCopyRectSpeed_test") {
|
||||
} else {
|
||||
int deviceId = 0;
|
||||
HIP_CHECK(hipSetDevice(deviceId));
|
||||
hipDeviceProp_t props = {0};
|
||||
hipDeviceProp_t props;
|
||||
HIP_CHECK(hipGetDeviceProperties(&props, deviceId));
|
||||
|
||||
INFO("hipPerfBufferCopyRectSpeed - info: Set device to " << deviceId
|
||||
|
||||
@@ -245,7 +245,7 @@ TEST_CASE("Perf_hipPerfBufferCopySpeed_test") {
|
||||
} else {
|
||||
int deviceId = 0;
|
||||
HIP_CHECK(hipSetDevice(deviceId));
|
||||
hipDeviceProp_t props = {0};
|
||||
hipDeviceProp_t props;
|
||||
HIP_CHECK(hipGetDeviceProperties(&props, deviceId));
|
||||
|
||||
INFO("hipPerfBufferCopySpeed - info: Set device to " << deviceId
|
||||
|
||||
@@ -56,7 +56,7 @@ static bool hipPerfDevMemReadSpeed_test() {
|
||||
|
||||
int deviceId = 0;
|
||||
HIP_CHECK(hipSetDevice(deviceId));
|
||||
hipDeviceProp_t props = {0};
|
||||
hipDeviceProp_t props;
|
||||
HIP_CHECK(hipGetDeviceProperties(&props, deviceId));
|
||||
|
||||
INFO("info: running on bus " << "0x" << props.pciBusID << " " <<
|
||||
|
||||
@@ -52,7 +52,7 @@ static bool hipPerfDevMemWriteSpeed_test() {
|
||||
|
||||
int deviceId = 0;
|
||||
HIP_CHECK(hipSetDevice(deviceId));
|
||||
hipDeviceProp_t props = {0};
|
||||
hipDeviceProp_t props;
|
||||
HIP_CHECK(hipGetDeviceProperties(&props, deviceId));
|
||||
|
||||
INFO("info: running on bus " << "0x" << props.pciBusID << " " <<
|
||||
|
||||
@@ -64,7 +64,6 @@ int getCpuAgentCount() {
|
||||
bool test(int cpuId, int gpuId, int numaMode, unsigned int hostMallocflags) {
|
||||
void *pages[NUM_PAGES];
|
||||
int status[NUM_PAGES];
|
||||
int nodes[NUM_PAGES];
|
||||
int ret_code;
|
||||
|
||||
INFO("set cpu " << cpuId << ", gpu " << gpuId << ", numaMode "
|
||||
|
||||
@@ -107,7 +107,7 @@ bool hipPerfMemset::open(int deviceId) {
|
||||
}
|
||||
|
||||
HIP_CHECK(hipSetDevice(deviceId));
|
||||
hipDeviceProp_t props = {0};
|
||||
hipDeviceProp_t props;
|
||||
HIP_CHECK(hipGetDeviceProperties(&props, deviceId));
|
||||
INFO("info: running on bus " << "0x" << props.pciBusID << " " << props.name
|
||||
<< " with " << props.multiProcessorCount << " CUs and device id: "
|
||||
@@ -325,7 +325,9 @@ void hipPerfMemset::run3D(unsigned int test, T memsetval,
|
||||
|
||||
auto end = std::chrono::steady_clock::now();
|
||||
|
||||
hipMemcpy3DParms myparms = {0};
|
||||
hipMemcpy3DParms myparms ;
|
||||
myparms.srcArray = nullptr;
|
||||
myparms.dstArray = nullptr;
|
||||
myparms.srcPos = make_hipPos(0, 0, 0);
|
||||
myparms.dstPos = make_hipPos(0, 0, 0);
|
||||
myparms.dstPtr = make_hipPitchedPtr(A_h, width , numW, numH);
|
||||
|
||||
@@ -95,20 +95,20 @@ class hipPerfSampleRate {
|
||||
// array of funtion pointers
|
||||
typedef void (hipPerfSampleRate::*funPtr)(void * outBuffer, unsigned int
|
||||
inBufSize, unsigned int writeIt, void **inBuffer, int numBufs,
|
||||
int grids, int blocks, int threads_per_block);
|
||||
int grids, int blocks);
|
||||
|
||||
// Wrappers
|
||||
void float_kernel(void * outBuffer, unsigned int inBufSize,
|
||||
unsigned int writeIt, void **inBuffer, int numBufs,
|
||||
int grids, int blocks, int threads_per_block);
|
||||
int grids, int blocks);
|
||||
|
||||
void float2_kernel(void * outBuffer, unsigned int inBufSize,
|
||||
unsigned int writeIt, void **inBuffer, int numBufs,
|
||||
int grids, int blocks, int threads_per_block);
|
||||
int grids, int blocks);
|
||||
|
||||
void float4_kernel(void * outBuffer, unsigned int inBufSize,
|
||||
unsigned int writeIt, void **inBuffer, int numBufs,
|
||||
int grids, int blocks, int threads_per_block);
|
||||
int grids, int blocks);
|
||||
|
||||
private:
|
||||
void setData(void *ptr, unsigned int value);
|
||||
@@ -136,8 +136,7 @@ bool hipPerfSampleRate::open(void) {
|
||||
}
|
||||
|
||||
int deviceId = 0;
|
||||
hipDeviceProp_t props = {0};
|
||||
props = {0};
|
||||
hipDeviceProp_t props;
|
||||
HIP_CHECK(hipSetDevice(deviceId));
|
||||
HIP_CHECK(hipGetDeviceProperties(&props, deviceId));
|
||||
INFO("info: running on bus " << "0x" << props.pciBusID << " " <<
|
||||
@@ -150,7 +149,7 @@ bool hipPerfSampleRate::open(void) {
|
||||
// Wrappers for the kernel launches
|
||||
void hipPerfSampleRate::float_kernel(void * outBuffer, unsigned int inBufSize,
|
||||
unsigned int writeIt, void **inBuffer, int numBufs,
|
||||
int grids, int blocks, int threads_per_block) {
|
||||
int grids, int blocks) {
|
||||
hipLaunchKernelGGL(sampleRateFloat<float>, dim3(grids, grids, grids),
|
||||
dim3(blocks), 0, 0, reinterpret_cast<float*>(outBuffer),
|
||||
inBufSize, writeIt, reinterpret_cast<float**>(inBuffer), numBufs);
|
||||
@@ -158,7 +157,7 @@ void hipPerfSampleRate::float_kernel(void * outBuffer, unsigned int inBufSize,
|
||||
|
||||
void hipPerfSampleRate::float2_kernel(void * outBuffer, unsigned int inBufSize,
|
||||
unsigned int writeIt, void **inBuffer, int grids,
|
||||
int blocks, int threads_per_block, int numBufs) {
|
||||
int blocks, int numBufs) {
|
||||
hipLaunchKernelGGL(sampleRate<float2>, dim3(grids, grids, grids),
|
||||
dim3(blocks), 0, 0, reinterpret_cast<float2 *>(outBuffer),
|
||||
inBufSize, writeIt, reinterpret_cast<float2 **>(inBuffer), numBufs);
|
||||
@@ -166,7 +165,7 @@ void hipPerfSampleRate::float2_kernel(void * outBuffer, unsigned int inBufSize,
|
||||
|
||||
void hipPerfSampleRate::float4_kernel(void * outBuffer, unsigned int inBufSize,
|
||||
unsigned int writeIt, void **inBuffer, int grids,
|
||||
int blocks, int threads_per_block, int numBufs) {
|
||||
int blocks, int numBufs) {
|
||||
hipLaunchKernelGGL(sampleRate<float4>, dim3(grids, grids, grids),
|
||||
dim3(blocks), 0, 0, reinterpret_cast<float4 *>(outBuffer),
|
||||
inBufSize, writeIt, reinterpret_cast<float4 **>(inBuffer), numBufs);
|
||||
@@ -224,7 +223,6 @@ void hipPerfSampleRate::run(unsigned int test) {
|
||||
// outBufSize_/sizeof(uint) - Grid size in 3D
|
||||
int grids = 64;
|
||||
int blocks = 64;
|
||||
int threads_per_block = 1;
|
||||
|
||||
unsigned int maxIter = MAX_ITERATIONS * (MAX_BUFS / numBufs_);
|
||||
unsigned int sizeDW = width_ * width_;
|
||||
@@ -244,7 +242,7 @@ void hipPerfSampleRate::run(unsigned int test) {
|
||||
auto all_start = std::chrono::steady_clock::now();
|
||||
for (uint i = 0; i < maxIter; i++) {
|
||||
(this->*p[idx]) (reinterpret_cast<void *>(dOutPtr), sizeDW, writeIt,
|
||||
dPtr, numBufs_, grids, blocks, threads_per_block);
|
||||
dPtr, numBufs_, grids, blocks);
|
||||
}
|
||||
|
||||
HIP_CHECK(hipDeviceSynchronize());
|
||||
|
||||
Fai riferimento in un nuovo problema
Block a user