Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Workflow fix benchmarking ci #39

Merged
merged 6 commits into from
Aug 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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/spdlog@1.8.2")
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()