Skip to content

Commit

Permalink
Disable warnings from CUDA library headers (kotekan#1085)
Browse files Browse the repository at this point in the history
* Prevent warnings form CUDA headers from being included in cmake output. 
* Fix a few unused variable warnings.
  • Loading branch information
andrerenard authored Mar 9, 2023
1 parent 292684d commit 542cdc6
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 1 deletion.
3 changes: 2 additions & 1 deletion lib/cuda/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ target_link_libraries(

set(CMAKE_CUDA_FLAGS "${CMAKE_CUDA_FLAGS} --forward-unknown-to-host-compiler")

target_include_directories(kotekan_cuda PUBLIC . ${CUDA_INCLUDE_DIR} ${CUDA_INCLUDE_DIRS})
target_include_directories(kotekan_cuda SYSTEM PUBLIC ${CUDA_INCLUDE_DIR} ${CUDA_INCLUDE_DIRS})
target_include_directories(kotekan_cuda PUBLIC .)

target_compile_options(kotekan_cuda PRIVATE $<$<COMPILE_LANGUAGE:CUDA>:-gencode
arch=compute_86,code=sm_86 -lineinfo>)
Expand Down
1 change: 1 addition & 0 deletions lib/cuda/cudaBasebandBeamformer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@ typedef CuDeviceArray<int32_t, 1> kernel_arg;

cudaEvent_t cudaBasebandBeamformer::execute(int gpu_frame_id,
const std::vector<cudaEvent_t>& pre_events) {
(void)pre_events;
pre_execute(gpu_frame_id);

void* voltage_memory = device.get_gpu_memory_array(_gpu_mem_voltage, gpu_frame_id, voltage_len);
Expand Down
1 change: 1 addition & 0 deletions lib/cuda/cudaCorrelatorAstron.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ cudaCorrelatorAstron::~cudaCorrelatorAstron() {}

cudaEvent_t cudaCorrelatorAstron::execute(int gpu_frame_id,
const std::vector<cudaEvent_t>& pre_events) {
(void)pre_events;
pre_execute(gpu_frame_id);

size_t input_frame_len = (size_t)_num_elements * _num_local_freq * _samples_per_data_set;
Expand Down
1 change: 1 addition & 0 deletions lib/cuda/cudaOutputDataZero.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ cudaOutputDataZero::~cudaOutputDataZero() {

cudaEvent_t cudaOutputDataZero::execute(int gpu_frame_id,
const std::vector<cudaEvent_t>& pre_events) {
(void)pre_events;
pre_execute(gpu_frame_id);

void* gpu_memory_frame = device.get_gpu_memory_array("output", gpu_frame_id, output_len);
Expand Down

0 comments on commit 542cdc6

Please sign in to comment.