Merge branch 'master' into nvvm_updates

This commit is contained in:
Rob Armstrong 2025-02-06 08:31:03 -08:00 committed by GitHub
commit eb378b2fce
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
19 changed files with 87 additions and 56 deletions

View File

@ -22,12 +22,19 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
# Find the NVSCI libraries
# use CMAKE_LIBRARY_PATH so that users can also specify the NVSCI lib path in cmake command
set(CMAKE_LIBRARY_PATH "/usr/lib" ${CMAKE_LIBRARY_PATH})
file(GLOB_RECURSE NVSCIBUF_LIB
${CMAKE_LIBRARY_PATH}/*/libnvscibuf.so
)
file(GLOB_RECURSE NVSCISYNC_LIB
${CMAKE_LIBRARY_PATH}/*/libnvscisync.so
)
foreach(LIBRARY_PATH ${CMAKE_LIBRARY_PATH})
file(GLOB_RECURSE NVSCIBUF_LIB
${LIBRARY_PATH}/libnvscibuf.so
${LIBRARY_PATH}/*/libnvscibuf.so
)
file(GLOB_RECURSE NVSCISYNC_LIB
${LIBRARY_PATH}/libnvscisync.so
${LIBRARY_PATH}/*/libnvscisync.so
)
if(NVSCIBUF_LIB AND NVSCISYNC_LIB)
break()
endif()
endforeach()
# Find the NVSCI header files
# use CMAKE_INCLUDE_PATH so that users can also specify the NVSCI include path in cmake command

View File

@ -28,7 +28,7 @@ cmake_minimum_required(VERSION 3.10.0)
project(libnvvm-samples)
enable_testing()
set_property(GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS TRUE)
#set_property(GLOBAL PROPERTY ALLOW_DUPLICATE_CUSTOM_TARGETS TRUE)
set(CMAKE_C_STANDARD 11)
# Initialize the CUDA Toolkit search using CUDA_HOME if the user specified it.

View File

@ -30,8 +30,7 @@ set_property(SOURCE dsl.c
PROPERTY COMPILE_DEFINITIONS LIBCUDADEVRT="${CUDADEVRT_LIB}")
add_executable(dsl dsl.c)
add_custom_target(clobber)
add_custom_target(testrun)
add_test(NAME device-side-launch COMMAND dsl
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
target_link_libraries(dsl ${NVVM_LIB} ${CUDA_LIB})

View File

@ -25,8 +25,7 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
add_executable(ptxgen ptxgen.c)
add_custom_target(clobber)
add_custom_target(testrun)
add_test(NAME ptxgenTest
COMMAND ptxgen "${CMAKE_CURRENT_SOURCE_DIR}/test.ll"
WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")

View File

@ -28,8 +28,7 @@ set(CMAKE_INSTALL_RPATH ${LIBNVVM_HOME})
set(CMAKE_INCLUDE_CURRENT_DIR YES)
add_executable(simple simple.c)
add_custom_target(clobber)
add_custom_target(testrun)
add_test(NAME simple COMMAND simple WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
target_link_libraries(simple ${NVVM_LIB} ${CUDA_LIB})

View File

@ -24,8 +24,6 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
add_custom_target(clobber)
add_custom_target(testrun)
add_test(NAME test-syscalls-malloc-free
COMMAND "${CMAKE_CURRENT_BINARY_DIR}/ptxgen/ptxgen" "${CMAKE_CURRENT_SOURCE_DIR}/malloc-free.ll"

View File

@ -30,9 +30,9 @@ set_property(SOURCE uvmlite.c
PROPERTY COMPILE_DEFINITIONS LIBCUDADEVRT="${CUDADEVRT_LIB}")
add_executable(uvmlite uvmlite.c)
add_custom_target(clobber)
add_custom_target(testrun)
add_test(NAME uvmlite COMMAND uvmlite WORKING_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}")
target_link_libraries(uvmlite ${NVVM_LIB} ${CUDA_LIB})
if (WIN32)

View File

@ -8,7 +8,7 @@ find_package(CUDAToolkit REQUIRED)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CUDA_ARCHITECTURES 50 52 60 61 70 75 80 86 89 90 100 101 120)
set(CMAKE_CUDA_ARCHITECTURES 72 87 101)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Wno-deprecated-gpu-targets")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
# set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -G") # enable cuda-gdb (expensive)

View File

@ -8,7 +8,7 @@ find_package(CUDAToolkit REQUIRED)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CUDA_ARCHITECTURES 53 61 70 72 75 80 86 87 90)
set(CMAKE_CUDA_ARCHITECTURES 72 87 101)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Wno-deprecated-gpu-targets")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")

View File

@ -8,7 +8,7 @@ find_package(CUDAToolkit REQUIRED)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CUDA_ARCHITECTURES 53 61 70 72 75 80 86 87 90)
set(CMAKE_CUDA_ARCHITECTURES 72 87 101)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Wno-deprecated-gpu-targets")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")

View File

@ -8,7 +8,7 @@ find_package(CUDAToolkit REQUIRED)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CUDA_ARCHITECTURES 53 61 70 72 75 80 86 87 90)
set(CMAKE_CUDA_ARCHITECTURES 72 87 101)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Wno-deprecated-gpu-targets")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")

View File

@ -8,7 +8,7 @@ find_package(CUDAToolkit REQUIRED)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CUDA_ARCHITECTURES 53 61 70 72 75 80 86 87 90)
set(CMAKE_CUDA_ARCHITECTURES 72 87 101)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Wno-deprecated-gpu-targets")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
@ -25,12 +25,19 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
# Find the NVSCI libraries
# use CMAKE_LIBRARY_PATH so that users can also specify the NVSCI lib path in cmake command
set(CMAKE_LIBRARY_PATH "/usr/lib" ${CMAKE_LIBRARY_PATH})
file(GLOB_RECURSE NVSCIBUF_LIB
${CMAKE_LIBRARY_PATH}/*/libnvscibuf.so
)
file(GLOB_RECURSE NVSCISYNC_LIB
${CMAKE_LIBRARY_PATH}/*/libnvscisync.so
)
foreach(LIBRARY_PATH ${CMAKE_LIBRARY_PATH})
file(GLOB_RECURSE NVSCIBUF_LIB
${LIBRARY_PATH}/libnvscibuf.so
${LIBRARY_PATH}/*/libnvscibuf.so
)
file(GLOB_RECURSE NVSCISYNC_LIB
${LIBRARY_PATH}/libnvscisync.so
${LIBRARY_PATH}/*/libnvscisync.so
)
if(NVSCIBUF_LIB AND NVSCISYNC_LIB)
break()
endif()
endforeach()
# Find the NVSCI header files
# use CMAKE_INCLUDE_PATH so that users can also specify the NVSCI include path in cmake command

View File

@ -8,7 +8,7 @@ find_package(CUDAToolkit REQUIRED)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CUDA_ARCHITECTURES 53 61 70 72 75 80 86 87 90)
set(CMAKE_CUDA_ARCHITECTURES 72 87 101)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Wno-deprecated-gpu-targets")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
@ -25,12 +25,19 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
# Find the NVSCI libraries
# use CMAKE_LIBRARY_PATH so that users can also specify the NVSCI lib path in cmake command
set(CMAKE_LIBRARY_PATH "/usr/lib" ${CMAKE_LIBRARY_PATH})
file(GLOB_RECURSE NVSCIBUF_LIB
${CMAKE_LIBRARY_PATH}/*/libnvscibuf.so
)
file(GLOB_RECURSE NVSCISYNC_LIB
${CMAKE_LIBRARY_PATH}/*/libnvscisync.so
)
foreach(LIBRARY_PATH ${CMAKE_LIBRARY_PATH})
file(GLOB_RECURSE NVSCIBUF_LIB
${LIBRARY_PATH}/libnvscibuf.so
${LIBRARY_PATH}/*/libnvscibuf.so
)
file(GLOB_RECURSE NVSCISYNC_LIB
${LIBRARY_PATH}/libnvscisync.so
${LIBRARY_PATH}/*/libnvscisync.so
)
if(NVSCIBUF_LIB AND NVSCISYNC_LIB)
break()
endif()
endforeach()
# Find the NVSCI header files
# use CMAKE_INCLUDE_PATH so that users can also specify the NVSCI include path in cmake command

View File

@ -8,7 +8,7 @@ find_package(CUDAToolkit REQUIRED)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CUDA_ARCHITECTURES 53 61 70 72 75 80 86 87 90)
set(CMAKE_CUDA_ARCHITECTURES 72 87 101)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Wno-deprecated-gpu-targets")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
@ -22,12 +22,19 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
# Find the NVSCI libraries
# use CMAKE_LIBRARY_PATH so that users can also specify the NVSCI lib path in cmake command
set(CMAKE_LIBRARY_PATH "/usr/lib" ${CMAKE_LIBRARY_PATH})
file(GLOB_RECURSE NVSCIBUF_LIB
${CMAKE_LIBRARY_PATH}/*/libnvscibuf.so
)
file(GLOB_RECURSE NVSCISYNC_LIB
${CMAKE_LIBRARY_PATH}/*/libnvscisync.so
)
foreach(LIBRARY_PATH ${CMAKE_LIBRARY_PATH})
file(GLOB_RECURSE NVSCIBUF_LIB
${LIBRARY_PATH}/libnvscibuf.so
${LIBRARY_PATH}/*/libnvscibuf.so
)
file(GLOB_RECURSE NVSCISYNC_LIB
${LIBRARY_PATH}/libnvscisync.so
${LIBRARY_PATH}/*/libnvscisync.so
)
if(NVSCIBUF_LIB AND NVSCISYNC_LIB)
break()
endif()
endforeach()
# Find the NVSCI header files
# use CMAKE_INCLUDE_PATH so that users can also specify the NVSCI include path in cmake command

View File

@ -8,7 +8,7 @@ find_package(CUDAToolkit REQUIRED)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CUDA_ARCHITECTURES 53 61 70 72 75 80 86 87 90)
set(CMAKE_CUDA_ARCHITECTURES 72 87 101)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Wno-deprecated-gpu-targets")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
@ -22,15 +22,23 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
# Find the NVSCI/NVMEDIA libraries
# use CMAKE_LIBRARY_PATH so that users can also specify the NVSCI lib path in cmake command
set(CMAKE_LIBRARY_PATH "/usr/lib" ${CMAKE_LIBRARY_PATH})
file(GLOB_RECURSE NVSCIBUF_LIB
${CMAKE_LIBRARY_PATH}/*/libnvscibuf.so
)
file(GLOB_RECURSE NVSCISYNC_LIB
${CMAKE_LIBRARY_PATH}/*/libnvscisync.so
)
file(GLOB_RECURSE NVMEDIA_LIB
${CMAKE_LIBRARY_PATH}/*/libnvmedia.so
)
foreach(LIBRARY_PATH ${CMAKE_LIBRARY_PATH})
file(GLOB_RECURSE NVSCIBUF_LIB
${LIBRARY_PATH}/libnvscibuf.so
${LIBRARY_PATH}/*/libnvscibuf.so
)
file(GLOB_RECURSE NVSCISYNC_LIB
${LIBRARY_PATH}/libnvscisync.so
${LIBRARY_PATH}/*/libnvscisync.so
)
file(GLOB_RECURSE NVMEDIA_LIB
${LIBRARY_PATH}/libnvmedia.so
${LIBRARY_PATH}/*/libnvmedia.so
)
if(NVSCIBUF_LIB AND NVSCISYNC_LIB AND NVMEDIA_LIB)
break()
endif()
endforeach()
# Find the NVSCI/NVMEDIA header files
# use CMAKE_INCLUDE_PATH so that users can also specify the NVSCI/NVMEDIA include path in cmake command

View File

@ -8,7 +8,7 @@ find_package(CUDAToolkit REQUIRED)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CUDA_ARCHITECTURES 50 52 60 61 70 75 80 86 89 90 100 101 120)
set(CMAKE_CUDA_ARCHITECTURES 72 87 101)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Wno-deprecated-gpu-targets")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")
# set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -G") # enable cuda-gdb (expensive)

View File

@ -8,7 +8,7 @@ find_package(CUDAToolkit REQUIRED)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CUDA_ARCHITECTURES 50 52 60 61 70 72 75 80 86 87 89 90)
set(CMAKE_CUDA_ARCHITECTURES 72 87 101)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Wno-deprecated-gpu-targets")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")

View File

@ -8,7 +8,7 @@ find_package(CUDAToolkit REQUIRED)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CUDA_ARCHITECTURES 53 61 70 72 75 80 86 87 90)
set(CMAKE_CUDA_ARCHITECTURES 72 87 101)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Wno-deprecated-gpu-targets")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")

View File

@ -8,7 +8,7 @@ find_package(CUDAToolkit REQUIRED)
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CUDA_ARCHITECTURES 53 61 70 72 75 80 86 87 90)
set(CMAKE_CUDA_ARCHITECTURES 72 87 101)
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Wno-deprecated-gpu-targets")
if(CMAKE_BUILD_TYPE STREQUAL "Debug")