diff --git a/.github/workflows/benchmarking.yaml b/.github/workflows/benchmarking.yaml index e97e605..79d6795 100644 --- a/.github/workflows/benchmarking.yaml +++ b/.github/workflows/benchmarking.yaml @@ -19,19 +19,15 @@ jobs: name: Continuous Benchmarking PRs with Bencher # DO NOT REMOVE: For handling Fork PRs see Pull Requests from Forks if: github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository + permissions: pull-requests: write + runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - uses: bencherdev/bencher@main - - name: Set up GCC - uses: egor-tensin/setup-gcc@v1 - with: - version: 11 - platform: x64 - - name: Set Flags run: export USE_CUDA=0 @@ -50,7 +46,7 @@ jobs: working-directory: ${{github.workspace}}/build # Configure CMake with benchmarking option on run: | - cmake -DNT_USE_PCH=ON -DNT_ENABLE_BENCHMARKING=ON -DCMAKE_PREFIX_PATH=`python3 -c 'import torch;print(torch.utils.cmake_prefix_path)'` -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} .. + cmake --debug-output -DNT_USE_PCH=ON -DNT_ENABLE_BENCHMARKING=ON -DCMAKE_PREFIX_PATH=`python3 -c 'import torch;print(torch.utils.cmake_prefix_path)'` -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} .. echo :::: Build directory post-CMake: ls echo diff --git a/CMakeLists.txt b/CMakeLists.txt index db0e407..8b6d58d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -19,6 +19,11 @@ enable_testing() #### add dependencies #### ########################## +find_package(Torch REQUIRED) +find_package(Protobuf REQUIRED) +message("Torch cxx flags: ${TORCH_CXX_FLAGS}") +set(CMAKE_CXX_FLAGS "-Wabi-tag ${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}") + include(cmake/CPM.cmake) CPMAddPackage("gh:gabime/spdlog@1.8.2") @@ -44,10 +49,6 @@ IF(NT_BUILD_TIMING) set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE "${CMAKE_COMMAND} -E time") ENDIF() -find_package(Torch REQUIRED) -find_package(Protobuf REQUIRED) -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${TORCH_CXX_FLAGS}") - ###################################### #### Go configure the actual code #### @@ -73,4 +74,4 @@ foreach (_variableName ${_variableNames}) endif() message(STATUS " ${_variableName}=${${_variableName}}") -endforeach() \ No newline at end of file +endforeach()