Skip to content

Commit

Permalink
[wip] [nvcc_only] Add definitions to resolve linking of libfmt
Browse files Browse the repository at this point in the history
Signed-off-by: Jan Bylicki <[email protected]>
  • Loading branch information
jbylicki committed Jan 2, 2025
1 parent 4f41117 commit 04d428f
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
3 changes: 2 additions & 1 deletion src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,8 @@ target_link_libraries(openroad
)

if (Kokkos_FOUND)
target_link_libraries(openroad gpl2 Kokkos::kokkos)
find_package(fmt REQUIRED)
target_link_libraries(openroad gpl2 Kokkos::kokkos omp fmt::fmt-header-only)
endif()

target_compile_definitions(openroad PRIVATE BUILD_TYPE="${CMAKE_BUILD_TYPE}")
Expand Down
4 changes: 4 additions & 0 deletions src/Main.cc
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,10 @@ static int tclAppInit(int& argc,

// bylu: start of merge changes
#ifdef ENABLE_KOKKOS
printf("KOKKOS IS HERE\n");
// Kokkos::InitializationSettings settings;
// settings.set_device_id(0);
// Kokkos::initialize(settings);
Kokkos::initialize();
#endif
ord::initOpenRoad(interp, log_filename, metrics_filename);
Expand Down
7 changes: 6 additions & 1 deletion src/gpl2/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,12 @@
include("openroad")
add_subdirectory(kokkos-fft)
find_package(Eigen3 REQUIRED)
find_package(OpenMP REQUIRED)
find_package(fmt REQUIRED)
find_package(Kokkos REQUIRED)

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -DEIGEN_NO_CUDA")

swig_lib(NAME gpl2
NAMESPACE gpl2
I_FILE src/dg_replace.i
Expand All @@ -50,7 +54,7 @@ target_sources(gpl2
src/dg_replace.cpp
src/wirelengthOp.cpp
src/densityOp.cpp
src/initialPlace.cpp
src/initialPlace.cpp
src/nesterovPlace.cpp
src/dct.cpp
src/poissonSolver.cpp
Expand Down Expand Up @@ -78,6 +82,7 @@ target_link_libraries(gpl2
grt
Kokkos::kokkos
KokkosFFT::fft
fmt::fmt-header-only
)

if (Python3_FOUND AND BUILD_PYTHON)
Expand Down

0 comments on commit 04d428f

Please sign in to comment.