Make directed_test support static libs
1.Make directed_test apps linked against static libs
of hip, rocclr, rocr, roct and amd_comgr.
2.Remove custom_target amdhip64_static_combiner.
3.Support EXCLUDE_HIP_LIB_TYPE <static|shared>.
4.Simplify argument list parsing.
5.Install rocclr when rocm is installed.
6.Fix some original small bugs.
Revert "Revert "Make directed_test support static libs""
This reverts commit 5b7533e49f.
Change-Id: I918eeae94487e5e2ff5bfde083667ac65fb6e702
This commit is contained in:
@@ -2,6 +2,14 @@ project(bit_extract)
|
||||
|
||||
cmake_minimum_required(VERSION 3.10)
|
||||
|
||||
if(NOT DEFINED __HIP_ENABLE_PCH)
|
||||
set(__HIP_ENABLE_PCH ON CACHE BOOL "enable/disable pre-compiled hip headers")
|
||||
endif()
|
||||
|
||||
if(${__HIP_ENABLE_PCH})
|
||||
add_definitions(-D__HIP_ENABLE_PCH)
|
||||
endif()
|
||||
|
||||
# Search for rocm in common locations
|
||||
list(APPEND CMAKE_PREFIX_PATH /opt/rocm/hip /opt/rocm)
|
||||
|
||||
|
||||
@@ -54,6 +54,20 @@ int main(int argc, char* argv[]) {
|
||||
size_t N = 1000000;
|
||||
size_t Nbytes = N * sizeof(uint32_t);
|
||||
|
||||
#ifdef __HIP_ENABLE_PCH
|
||||
// Verify hip_pch.o
|
||||
const char* pch = nullptr;
|
||||
unsigned int size = 0;
|
||||
__hipGetPCH(&pch, &size);
|
||||
printf("pch size: %u\n", size);
|
||||
if (size == 0) {
|
||||
printf("__hipGetPCH failed!\n");
|
||||
return -1;
|
||||
} else {
|
||||
printf("__hipGetPCH succeeded!\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
int deviceId;
|
||||
CHECK(hipGetDevice(&deviceId));
|
||||
hipDeviceProp_t props;
|
||||
|
||||
Reference in New Issue
Block a user