Skip to content

Commit

Permalink
[shortfin] Fix build error keeping amdgpu Python bindings from being …
Browse files Browse the repository at this point in the history
…included.

This fixes forward an issue introduced in #434.
  • Loading branch information
stellaraccident committed Nov 9, 2024
1 parent bdff9e3 commit 86ff97d
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
5 changes: 5 additions & 0 deletions shortfin/src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

# Any definitions which must be reflected on the public library must be added
# to this library.
add_library(shortfin_public_defs INTERFACE)

add_subdirectory(shortfin)

# Common definitions exported from both static and dynamic libraries.
Expand All @@ -28,6 +32,7 @@ shortfin_public_library(
shortfin_systems_factory
${_SHORTFIN_LIB_OPTIONAL_COMPONENTS}
USAGE_DEPS
shortfin_public_defs
spdlog::spdlog
fmt::fmt
xtensor
Expand Down
2 changes: 2 additions & 0 deletions shortfin/src/shortfin/local/systems/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ shortfin_cc_component(
iree_task_task
)
list(APPEND _SYSTEM_COMPONENTS shortfin_systems_host)
target_compile_definitions(shortfin_public_defs INTERFACE SHORTFIN_HAVE_HOSTCPU)

if(SHORTFIN_SYSTEMS_AMDGPU)
shortfin_cc_component(
Expand All @@ -47,6 +48,7 @@ if(SHORTFIN_SYSTEMS_AMDGPU)
iree_hal_drivers_hip_hip
)
list(APPEND _SYSTEM_COMPONENTS shortfin_systems_amdgpu)
target_compile_definitions(shortfin_public_defs INTERFACE SHORTFIN_HAVE_AMDGPU)
endif()

shortfin_cc_component(
Expand Down

0 comments on commit 86ff97d

Please sign in to comment.