Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
aPere3 committed Feb 24, 2025
1 parent 180cac8 commit ee0ea6a
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 5 deletions.
13 changes: 13 additions & 0 deletions .github/workflows/concrete_compiler_test_cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,9 +117,22 @@ jobs:
set -e
cd /concrete/compilers/concrete-compiler/compiler
rm -rf /build/*
ccache -z
ccache -p
cargo install cxxbridge-cmd
dnf -y install libatomic
make DATAFLOW_EXECUTION_ENABLED=ON Python3_EXECUTABLE=$PYTHON_EXEC BUILD_DIR=/build all
- name: Ccache stats
if: always()
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3
id: ccache-report
with:
registry: ghcr.io
image: ${{ env.DOCKER_IMAGE_TEST }}
username: ${{ secrets.GHCR_LOGIN }}
password: ${{ secrets.GHCR_PASSWORD }}
shell: bash
run: |
echo "Debug: ccache statistics (after the build):"
ccache -s
- name: Check compiler dialects docs is up to date
Expand Down
13 changes: 13 additions & 0 deletions .github/workflows/concrete_compiler_test_gpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -72,9 +72,22 @@ jobs:
set -e
cd /concrete/compilers/concrete-compiler/compiler
rm -rf /build/*
ccache -z
ccache -p
cargo install cxxbridge-cmd
mkdir -p /tmp/concrete_compiler/gpu_tests/
make BINDINGS_PYTHON_ENABLED=OFF Python3_EXECUTABLE=$PYTHON_EXEC CUDA_SUPPORT=ON CUDA_PATH=${{ env.CUDA_PATH }} run-end-to-end-tests-gpu
- name: Ccache stats
if: always()
uses: addnab/docker-run-action@4f65fabd2431ebc8d299f8e5a018d79a769ae185 # v3
id: ccache-report
with:
registry: ghcr.io
image: ${{ env.DOCKER_IMAGE_TEST }}
username: ${{ secrets.GHCR_LOGIN }}
password: ${{ secrets.GHCR_PASSWORD }}
shell: bash
run: |
echo "Debug: ccache statistics (after the build):"
ccache -s
- name: Slack Notification
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/concrete_compiler_test_macos_cpu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ jobs:
} >> "${GITHUB_ENV}"
- name: Install dependencies
run: |
brew install ninja ccache
brew install ninja ccache zstd
${PIP} install pytest
- name: Build compiler
run: |
Expand Down
3 changes: 3 additions & 0 deletions compilers/concrete-compiler/compiler/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ add_definitions("-Wno-dollar-in-identifier-extension")
add_definitions("-Wno-c++98-compat-extra-semi")
add_definitions("-Wno-strict-aliasing")
add_definitions("-Wno-date-time")
add_definitions("-Wno-suggest-override")
add_definitions("-Wno-ctad-maybe-unsupported")
add_definitions("-Wall ")
add_definitions("-Werror ")
add_definitions("-Wfatal-errors")
Expand Down Expand Up @@ -138,6 +140,7 @@ ExternalProject_Add(
add_library(rust_deps_bundle STATIC IMPORTED)
set_target_properties(rust_deps_bundle PROPERTIES IMPORTED_LOCATION "${RUST_DEPS_BUNDLE_LIB}")
add_dependencies(rust_deps_bundle rust_deps_bundle_build)
target_link_libraries(rust_deps_bundle INTERFACE dl)

# --------------------------------------------------------------------------------
# Concrete Cuda Configuration
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ fn main() {
println!("cargo::rustc-link-lib=z");
#[cfg(target_os = "macos")]
{
println!("cargo::rustc-link-search=/opt/homebrew/lib")
println!("cargo::rustc-link-lib=curses");
println!("cargo::rustc-link-lib=zstd");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ add_dependencies(ConcretelangRuntime rust_deps_bundle concrete-protocol)

if(CONCRETELANG_DATAFLOW_EXECUTION_ENABLED)
target_link_libraries(ConcretelangRuntime PUBLIC HPX::hpx HPX::iostreams_component HPX::component)
target_link_libraries(ConcretelangRuntime PRIVATE hwloc)
set_source_files_properties(DFRuntime.cpp PROPERTIES COMPILE_FLAGS "-fopenmp")
target_include_directories(ConcretelangRuntime PUBLIC ${HPX_INCLUDE_DIRS})
endif()

if(CONCRETELANG_CUDA_SUPPORT)
target_link_libraries(ConcretelangRuntime LINK_PUBLIC tfhe_cuda_backend)
target_link_libraries(ConcretelangRuntime PRIVATE hwloc)
endif()

if(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
Expand Down Expand Up @@ -76,7 +77,7 @@ install(EXPORT ConcretelangRuntime DESTINATION "./")
######

add_library(
ConcretelangRuntimeStatic
ConcretelangRuntimeStatic STATIC
context.cpp
simulation.cpp
wrappers.cpp
Expand Down Expand Up @@ -108,3 +109,7 @@ target_link_libraries(
$<TARGET_OBJECTS:mlir_c_runner_utils>
$<TARGET_OBJECTS:mlir_float16_utils>
$<TARGET_OBJECTS:MLIRSparseTensorRuntime>)

if(CONCRETELANG_DATAFLOW_EXECUTION_ENABLED)
target_link_libraries(ConcretelangRuntimeStatic PUBLIC HPX::hpx HPX::iostreams_component HPX::component)
endif()
3 changes: 1 addition & 2 deletions compilers/concrete-compiler/compiler/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ target_link_libraries(
MLIRLLVMToLLVMIRTranslation
RTDialect
ConcretelangSupport
ConcretelangCommon
dl)
ConcretelangCommon)

mlir_check_all_link_libraries(concretecompiler)

0 comments on commit ee0ea6a

Please sign in to comment.