Initial (non-default) support for shared library HIP
[ROCm/hip commit: 9de57129b4]
This commit is contained in:
1 parent
010529ecf5
commit
44cdc3c6a5
2 files changed
+25
-11
No files matched your search
@@ -64,11 +64,25 @@ src/hip_peer.cpp
|
|||||||
src/hip_stream.cpp
|
src/hip_stream.cpp
|
||||||
src/staging_buffer.cpp)
|
src/staging_buffer.cpp)
|
||||||
|
|
||||||
|
if(NOT DEFINED ENV{HIP_USE_SHARED_LIBRARY})
|
||||||
|
set(HIP_USE_SHARED_LIBRARY 0)
|
||||||
|
else()
|
||||||
|
set(HIP_USE_SHARED_LIBRARY $ENV{HIP_USE_SHARED_LIBRARY})
|
||||||
|
endif()
|
||||||
|
|
||||||
#add_library(hip_hcc STATIC ${SOURCE_FILES})
|
#add_library(hip_hcc STATIC ${SOURCE_FILES})
|
||||||
add_library(hip_hcc OBJECT ${SOURCE_FILES})
|
if(${HIP_USE_SHARED_LIBRARY} EQUAL 1)
|
||||||
|
add_library(hip_hcc SHARED ${SOURCE_FILES})
|
||||||
|
else()
|
||||||
|
add_library(hip_hcc OBJECT ${SOURCE_FILES})
|
||||||
|
endif()
|
||||||
|
|
||||||
#install(TARGETS hip_hcc DESTINATION lib)
|
#install(TARGETS hip_hcc DESTINATION lib)
|
||||||
install(DIRECTORY ${PROJECT_BINARY_DIR}/CMakeFiles/hip_hcc.dir/src/ DESTINATION lib)
|
if(${HIP_USE_SHARED_LIBRARY} EQUAL 1)
|
||||||
|
install(TARGETS hip_hcc DESTINATION lib)
|
||||||
|
else()
|
||||||
|
install(DIRECTORY ${PROJECT_BINARY_DIR}/CMakeFiles/hip_hcc.dir/src/ DESTINATION lib)
|
||||||
|
endif()
|
||||||
set(EXECUTE_COMMAND test ${CMAKE_INSTALL_PREFIX} -ef ${CMAKE_CURRENT_SOURCE_DIR})
|
set(EXECUTE_COMMAND test ${CMAKE_INSTALL_PREFIX} -ef ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
execute_process(COMMAND ${EXECUTE_COMMAND} RESULT_VARIABLE INSTALL_SOURCE)
|
execute_process(COMMAND ${EXECUTE_COMMAND} RESULT_VARIABLE INSTALL_SOURCE)
|
||||||
if(NOT ${INSTALL_SOURCE} EQUAL 0)
|
if(NOT ${INSTALL_SOURCE} EQUAL 0)
|
||||||
|
|||||||
@@ -126,12 +126,12 @@ endmacro()
|
|||||||
|
|
||||||
#make_hip_executable (hipAPIStreamEnable hipAPIStreamEnable.cpp)
|
#make_hip_executable (hipAPIStreamEnable hipAPIStreamEnable.cpp)
|
||||||
#make_hip_executable (hipAPIStreamDisable hipAPIStreamDisable.cpp)
|
#make_hip_executable (hipAPIStreamDisable hipAPIStreamDisable.cpp)
|
||||||
make_hip_executable (hip_ballot hip_ballot.cpp)
|
##make_hip_executable (hip_ballot hip_ballot.cpp)
|
||||||
make_hip_executable (hip_anyall hip_anyall.cpp)
|
##make_hip_executable (hip_anyall hip_anyall.cpp)
|
||||||
make_hip_executable (hip_popc hip_popc.cpp)
|
##make_hip_executable (hip_popc hip_popc.cpp)
|
||||||
make_hip_executable (hip_clz hip_clz.cpp)
|
##make_hip_executable (hip_clz hip_clz.cpp)
|
||||||
make_hip_executable (hip_brev hip_brev.cpp)
|
##make_hip_executable (hip_brev hip_brev.cpp)
|
||||||
make_hip_executable (hip_ffs hip_ffs.cpp)
|
##make_hip_executable (hip_ffs hip_ffs.cpp)
|
||||||
make_hip_executable (hipGetDeviceAttribute hipGetDeviceAttribute.cpp)
|
make_hip_executable (hipGetDeviceAttribute hipGetDeviceAttribute.cpp)
|
||||||
make_hip_executable (hipEnvVar hipEnvVar.cpp)
|
make_hip_executable (hipEnvVar hipEnvVar.cpp)
|
||||||
make_hip_executable (hipEnvVarDriver hipEnvVarDriver.cpp)
|
make_hip_executable (hipEnvVarDriver hipEnvVarDriver.cpp)
|
||||||
@@ -143,10 +143,10 @@ make_hip_executable (hipEventRecord hipEventRecord.cpp)
|
|||||||
make_hip_executable (hipLanguageExtensions hipLanguageExtensions.cpp)
|
make_hip_executable (hipLanguageExtensions hipLanguageExtensions.cpp)
|
||||||
make_hip_executable (hipGridLaunch hipGridLaunch.cpp)
|
make_hip_executable (hipGridLaunch hipGridLaunch.cpp)
|
||||||
make_hip_executable (hipHcc hipHcc.cpp)
|
make_hip_executable (hipHcc hipHcc.cpp)
|
||||||
make_hip_executable (hipSimpleAtomicsTest hipSimpleAtomicsTest.cpp)
|
#make_hip_executable (hipSimpleAtomicsTest hipSimpleAtomicsTest.cpp)
|
||||||
make_hip_executable (hipMathFunctionsHost hipMathFunctions.cpp hipSinglePrecisionMathHost.cpp hipDoublePrecisionMathHost.cpp)
|
make_hip_executable (hipMathFunctionsHost hipMathFunctions.cpp hipSinglePrecisionMathHost.cpp hipDoublePrecisionMathHost.cpp)
|
||||||
make_hip_executable (hipMathFunctionsDevice hipMathFunctions.cpp hipSinglePrecisionMathDevice.cpp hipDoublePrecisionMathDevice.cpp)
|
##make_hip_executable (hipMathFunctionsDevice hipMathFunctions.cpp hipSinglePrecisionMathDevice.cpp hipDoublePrecisionMathDevice.cpp)
|
||||||
make_hip_executable (hipIntrinsics hipMathFunctions.cpp hipSinglePrecisionIntrinsics.cpp hipDoublePrecisionIntrinsics.cpp hipIntegerIntrinsics.cpp)
|
##make_hip_executable (hipIntrinsics hipMathFunctions.cpp hipSinglePrecisionIntrinsics.cpp hipDoublePrecisionIntrinsics.cpp hipIntegerIntrinsics.cpp)
|
||||||
#TODO - re-enable. This uses the pointer add feature.
|
#TODO - re-enable. This uses the pointer add feature.
|
||||||
make_hip_executable (hipPointerAttrib hipPointerAttrib.cpp)
|
make_hip_executable (hipPointerAttrib hipPointerAttrib.cpp)
|
||||||
make_hip_executable (hipMultiThreadStreams1 hipMultiThreadStreams1.cpp)
|
make_hip_executable (hipMultiThreadStreams1 hipMultiThreadStreams1.cpp)
|
||||||
|
|||||||
Reference in new issue
Block a user