From de6baab2b3f63004d12eb03397bf123e9386446b Mon Sep 17 00:00:00 2001 From: Christian Zentgraf Date: Tue, 27 Aug 2024 13:07:42 -0700 Subject: [PATCH] Fix several build issues in CI when using Clang (#10800) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Summary: A number of issues came up when building the CI pipeline with Clang. 1. When CUDA nvcc uses Clang it complains that totalBytes is set but unused. �The intent seems to have been that the parameter is an in- and output parameter. 2. If benchmarks are not turned on then the CUDA build fails as dependencies are not available. 3. HDFS virtual function definition not explicitly overridden causing an error �(error: 'rename' overrides a member function but is not marked 'override’). Pull Request resolved: https://github.com/facebookincubator/velox/pull/10800 Reviewed By: DanielHunte Differential Revision: D61862435 Pulled By: kgpai fbshipit-source-id: 3aef27e8ed1c4dd8fe78221c5dd859656fc65e69 --- .../storage_adapters/hdfs/HdfsFileSystem.h | 2 +- velox/experimental/wave/exec/Vectors.cpp | 2 +- .../wave/exec/tests/CMakeLists.txt | 86 ++++++++++--------- 3 files changed, 46 insertions(+), 44 deletions(-) diff --git a/velox/connectors/hive/storage_adapters/hdfs/HdfsFileSystem.h b/velox/connectors/hive/storage_adapters/hdfs/HdfsFileSystem.h index c9a4e879bdfa..25602a470f16 100644 --- a/velox/connectors/hive/storage_adapters/hdfs/HdfsFileSystem.h +++ b/velox/connectors/hive/storage_adapters/hdfs/HdfsFileSystem.h @@ -61,7 +61,7 @@ class HdfsFileSystem : public FileSystem { virtual void rename( std::string_view path, std::string_view newPath, - bool overWrite = false) { + bool overWrite = false) override { VELOX_UNSUPPORTED("rename for HDFs not implemented"); } diff --git a/velox/experimental/wave/exec/Vectors.cpp b/velox/experimental/wave/exec/Vectors.cpp index f8947ec58edf..919c59b03f94 100644 --- a/velox/experimental/wave/exec/Vectors.cpp +++ b/velox/experimental/wave/exec/Vectors.cpp @@ -74,7 +74,7 @@ void transferVector( std::vector& waveVectors, std::vector& operands, GpuArena& arena, - int64_t totalBytes) { + int64_t& totalBytes) { if (waveVectors.size() <= index) { waveVectors.resize(index + 1); } diff --git a/velox/experimental/wave/exec/tests/CMakeLists.txt b/velox/experimental/wave/exec/tests/CMakeLists.txt index e10cce40ba42..ae5868205102 100644 --- a/velox/experimental/wave/exec/tests/CMakeLists.txt +++ b/velox/experimental/wave/exec/tests/CMakeLists.txt @@ -59,46 +59,48 @@ target_link_libraries( add_test(velox_wave_exec_test velox_wave_exec_test) -add_executable(velox_wave_benchmark WaveBenchmark.cpp) +if(${VELOX_ENABLE_BENCHMARKS}) + add_executable(velox_wave_benchmark WaveBenchmark.cpp) -target_link_libraries( - velox_wave_benchmark - velox_query_benchmark - velox_wave_exec - velox_wave_mock_reader - velox_aggregates - velox_dwio_common - velox_dwio_common_exception - velox_dwio_common_test_utils - velox_dwio_parquet_reader - velox_dwio_parquet_writer - velox_exec - velox_exec_test_lib - velox_functions_json - velox_functions_lib - velox_functions_prestosql - velox_functions_test_lib - velox_hive_connector - velox_memory - velox_serialization - velox_test_util - velox_type - velox_vector - velox_vector_fuzzer - Boost::atomic - Boost::context - Boost::date_time - Boost::filesystem - Boost::program_options - Boost::regex - Boost::thread - Boost::system - gtest - gtest_main - gmock - ${FOLLY_BENCHMARK} - Folly::folly - gflags::gflags - glog::glog - fmt::fmt - ${FILESYSTEM}) + target_link_libraries( + velox_wave_benchmark + velox_query_benchmark + velox_wave_exec + velox_wave_mock_reader + velox_aggregates + velox_dwio_common + velox_dwio_common_exception + velox_dwio_common_test_utils + velox_dwio_parquet_reader + velox_dwio_parquet_writer + velox_exec + velox_exec_test_lib + velox_functions_json + velox_functions_lib + velox_functions_prestosql + velox_functions_test_lib + velox_hive_connector + velox_memory + velox_serialization + velox_test_util + velox_type + velox_vector + velox_vector_fuzzer + Boost::atomic + Boost::context + Boost::date_time + Boost::filesystem + Boost::program_options + Boost::regex + Boost::thread + Boost::system + gtest + gtest_main + gmock + ${FOLLY_BENCHMARK} + Folly::folly + gflags::gflags + glog::glog + fmt::fmt + ${FILESYSTEM}) +endif()