Skip to content

Commit

Permalink
Merge pull request #39 from ewanwm/workflow_fix_benchmarking_CI
Browse files Browse the repository at this point in the history
Workflow fix benchmarking ci
  • Loading branch information
ewanwm authored Aug 7, 2024
2 parents 994e32c + 95fc4e0 commit 9854f79
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 12 deletions.
10 changes: 3 additions & 7 deletions .github/workflows/benchmarking.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand Down
11 changes: 6 additions & 5 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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/[email protected]")
Expand All @@ -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 ####
Expand All @@ -73,4 +74,4 @@ foreach (_variableName ${_variableNames})
endif()

message(STATUS " ${_variableName}=${${_variableName}}")
endforeach()
endforeach()

0 comments on commit 9854f79

Please sign in to comment.