Temporarily comment out Hcc-specific APIs for CLang compiler
Temporarily comment out Hcc-specific template functions
hipExtLaunchKernelGGL and hipOccupancyMaxPotentialBlockSize for CLang
compiler so that all test cases under hip/samples can be built
successfully for Clang + Hip/Hcc runtime.
Change-Id: Iafc761257be4a7b34eafa6759a01f369570cd6ce
[ROCm/hip-tests commit: 6eabd2e7dd]
Bu işleme şunda yer alıyor:
+1
-1
@@ -109,7 +109,7 @@ int main() {
|
|||||||
/***********************************************************************************/
|
/***********************************************************************************/
|
||||||
|
|
||||||
//Timing directly the dispatch
|
//Timing directly the dispatch
|
||||||
#ifdef __HIP_PLATFORM_HCC__
|
#if defined(__HIP_PLATFORM_HCC__) && GENERIC_GRID_LAUNCH == 1 && defined(__HCC__)
|
||||||
for (auto i = 0; i < TOTAL_RUN_COUNT; ++i) {
|
for (auto i = 0; i < TOTAL_RUN_COUNT; ++i) {
|
||||||
hipExtLaunchKernelGGL((EmptyKernel), dim3(NUM_GROUPS), dim3(GROUP_SIZE), 0, stream0, start, stop, 0);
|
hipExtLaunchKernelGGL((EmptyKernel), dim3(NUM_GROUPS), dim3(GROUP_SIZE), 0, stream0, start, stop, 0);
|
||||||
hipEventSynchronize(stop);
|
hipEventSynchronize(stop);
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ void multiplyCPU(float* C, float* A, float* B, int N){
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if defined(__HIP_PLATFORM_HCC__) && GENERIC_GRID_LAUNCH == 1 && defined(__HCC__)
|
||||||
|
|
||||||
void launchKernel(float* C, float* A, float* B, bool manual){
|
void launchKernel(float* C, float* A, float* B, bool manual){
|
||||||
|
|
||||||
hipDeviceProp_t devProp;
|
hipDeviceProp_t devProp;
|
||||||
@@ -93,8 +95,10 @@ void launchKernel(float* C, float* A, float* B, bool manual){
|
|||||||
std::cout << "Theoretical Occupancy is " << (double)numBlock* blockSize/devProp.maxThreadsPerMultiProcessor * 100 << "%" << std::endl;
|
std::cout << "Theoretical Occupancy is " << (double)numBlock* blockSize/devProp.maxThreadsPerMultiProcessor * 100 << "%" << std::endl;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
int main() {
|
int main() {
|
||||||
|
#if defined(__HIP_PLATFORM_HCC__) && GENERIC_GRID_LAUNCH == 1 && defined(__HCC__)
|
||||||
float *A, *B, *C0, *C1, *cpuC;
|
float *A, *B, *C0, *C1, *cpuC;
|
||||||
float *Ad, *Bd, *C0d, *C1d;
|
float *Ad, *Bd, *C0d, *C1d;
|
||||||
int errors=0;
|
int errors=0;
|
||||||
@@ -173,4 +177,8 @@ int main() {
|
|||||||
free(C0);
|
free(C0);
|
||||||
free(C1);
|
free(C1);
|
||||||
free(cpuC);
|
free(cpuC);
|
||||||
|
#else
|
||||||
|
std::cout <<"hipOccupancyMaxPotentialBlockSize template not support for Clang compiler"<<std::endl;
|
||||||
|
#endif
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|||||||
Yeni konuda referans
Bir kullanıcı engelle