mirror of
https://gitlab.kitware.com/vtk/vtk-m
synced 2024-10-06 10:29:00 +00:00
Update VTKmCompilerFlags to suppress stack-size-warnings on CUDA 9+
This will allow better suppression of cuda stack size warnings for developers and build machines.
This commit is contained in:
parent
bef70820c9
commit
7a5e32be73
@ -101,7 +101,7 @@ if(VTKM_COMPILER_IS_MSVC)
|
||||
#Setup MSVC warnings with CUDA and CXX
|
||||
target_compile_options(vtkm_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CXX>:-wd4702 -wd4505>)
|
||||
if(TARGET vtkm::cuda)
|
||||
target_compile_options(vtkm_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=-wd4702,-wd4505 -Xcudafe=--display_error_number,--diag_suppress=1394,--diag_suppress=766>)
|
||||
target_compile_options(vtkm_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CUDA>:-Xcompiler=-wd4702,-wd4505 -Xcudafe=--diag_suppress=1394,--diag_suppress=766>)
|
||||
endif()
|
||||
|
||||
if(MSVC_VERSION LESS 1900)
|
||||
@ -124,7 +124,7 @@ elseif(VTKM_COMPILER_IS_ICC)
|
||||
|
||||
elseif(VTKM_COMPILER_IS_GNU OR VTKM_COMPILER_IS_CLANG)
|
||||
set(cxx_flags -Wall -Wno-long-long -Wcast-align -Wconversion -Wchar-subscripts -Wextra -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -fno-common)
|
||||
set(cuda_flags -Xcudafe=--display_error_number -Xcompiler=-Wall,-Wno-unknown-pragmas,-Wno-unused-local-typedefs,-Wno-unused-local-typedefs,-Wno-unused-function,-Wno-long-long,-Wcast-align,-Wconversion,-Wchar-subscripts,-Wpointer-arith,-Wformat,-Wformat-security,-Wshadow,-Wunused-parameter,-fno-common)
|
||||
set(cuda_flags -Xcompiler=-Wall,-Wno-unknown-pragmas,-Wno-unused-local-typedefs,-Wno-unused-local-typedefs,-Wno-unused-function,-Wno-long-long,-Wcast-align,-Wconversion,-Wchar-subscripts,-Wpointer-arith,-Wformat,-Wformat-security,-Wshadow,-Wunused-parameter,-fno-common)
|
||||
|
||||
#GCC 5, 6 don't properly handle strict-overflow suppression through pragma's.
|
||||
#Instead of suppressing around the location of the strict-overflow you
|
||||
@ -142,6 +142,19 @@ elseif(VTKM_COMPILER_IS_GNU OR VTKM_COMPILER_IS_CLANG)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
#common warnings for all platforms when building cuda
|
||||
if(TARGET vtkm::cuda)
|
||||
if(CMAKE_CUDA_COMPILER_VERSION VERSION_GREATER 8.99.0)
|
||||
#nvcc 9 introduced specific controls to disable the stack size warning
|
||||
#otherwise we let the warning occur. We have to set this in CMAKE_CUDA_FLAGS
|
||||
#as it is passed to the device link step, unlike compile_options
|
||||
set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} -Xnvlink=--suppress-stack-size-warning")
|
||||
endif()
|
||||
|
||||
set(display_error_nums -Xcudafe=--display_error_number)
|
||||
target_compile_options(vtkm_developer_flags INTERFACE $<$<COMPILE_LANGUAGE:CUDA>:${suppress_nvlink_stack_size_warnings} ${display_error_nums}>)
|
||||
endif()
|
||||
|
||||
if(NOT VTKm_INSTALL_ONLY_LIBRARIES)
|
||||
install(TARGETS vtkm_compiler_flags vtkm_developer_flags EXPORT ${VTKm_EXPORT_NAME})
|
||||
endif()
|
||||
|
@ -37,6 +37,7 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
|
||||
"CONTRIBUTING.md.*warning"
|
||||
"CodingConventions.md.*warning"
|
||||
|
||||
|
||||
# disable PTX warning about recursive functions. These look like they can't be silenced
|
||||
# without disabling all PTX warnings, show hide them on the dashboard.
|
||||
# We explicitly only suppress specific worklets so we can see when new recursive
|
||||
@ -45,4 +46,13 @@ list(APPEND CTEST_CUSTOM_WARNING_EXCEPTION
|
||||
"ptxas warning : Stack size for entry function.*BoundingIntervalHierarchy.*"
|
||||
"ptxas warning : Stack size for entry function.*CoordinatesPortal.*"
|
||||
"ptxas warning : Stack size for entry function.*CellRangesExtracter.*"
|
||||
|
||||
# disable nvlink warnings about virtual functions. The Stack size warnings can only
|
||||
# be silenced in CUDA >=9, without disabling all nvlink warnings.
|
||||
"nvlink warning : Stack size for entry function.*NearestNeighborSearch.*"
|
||||
"nvlink warning : Stack size for entry function.*ArrayPortalRef.*"
|
||||
"nvlink warning : Stack size for entry function.*ArrayPortalWrapper.*"
|
||||
"nvlink warning : .*ArrayPortalWrapper.* has address taken but no possible call to it"
|
||||
"nvlink warning : .*ArrayPortalVirtual.* has address taken but no possible call to it"
|
||||
|
||||
)
|
||||
|
Loading…
Reference in New Issue
Block a user