Skip to content

Commit

Permalink
Switch to using purely dynamic libs for tt-mlir (#221)
Browse files Browse the repository at this point in the history
### Problem description
We want to change our linking strategy for tt-mlir to use dynamic
linking. For some reason, this breaks CI for this repo. We fix by making
stablehlo deps embedded in dylib, and also remove various static tt-mlir
lib linking here (since components have been folded into the shared
lib).

Related to: tenstorrent/tt-mlir#1947

### What's changed
Simplifies how we import tt-mlir by folding everything into shared-lib
target--remove links to all static tt-mlir libs, including stablehlo +
shardy.

Checklist
[X] successful on-pr run
  • Loading branch information
vwellsTT authored Feb 4, 2025
1 parent 83c3808 commit 35cce74
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 66 deletions.
67 changes: 2 additions & 65 deletions src/common/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -46,76 +46,13 @@ target_include_directories(TTPJRTCommon PUBLIC
${TTMLIR_TOOLCHAIN_DIR}/src/stablehlo
)

set(STABLEHLO_LIBS
StablehloBase
StablehloReferenceIndex
StablehloReferenceErrors
StablehloReferenceElement
StablehloReferenceAxes
StablehloReferenceValue
StablehloReferenceTypes
StablehloReferenceToken
StablehloReferenceTensor
StablehloReferenceScope
StablehloReferenceProcessGrid
StablehloReferenceProcess
StablehloReferenceOps
StablehloPasses
ChloOps
Version
VhloOps
VhloTypes
SdyDialect
SdyRegister
StablehloOps
StablehloRegister
StablehloReferenceToken
StablehloLinalgTransforms
StablehloReferenceValue
StablehloReferenceScope
StablehloPasses
StablehloReferenceOps
StablehloSerialization
InterpreterOps
StablehloPortableApi
StablehloPasses
StablehloAssemblyFormat
StablehloOps
StablehloReferenceElement
StablehloReferenceOps
StablehloReferenceTensor
StablehloRegister
StablehloBase
StablehloPasses
StablehloReferenceErrors
StablehloReferenceProcess
StablehloReferenceToken
StablehloSerialization
StablehloBroadcastUtils
StablehloPortableApi
StablehloReferenceIndex
StablehloReferenceProcessGrid
StablehloReferenceTypes
StablehloTypeInference
StablehloLinalgTransforms
StablehloReferenceAxes
StablehloReferenceNumPy
StablehloReferenceScope
StablehloReferenceValue
)

target_link_libraries(TTPJRTCommon PUBLIC
loguru
LLVM
MLIR
TTMLIR
TTPJRTCommonDylibPlatform
TTMLIRStatic
TTMLIRTosaToTTIR
TTMLIRTTIRToLinalg
MLIRTTIRPipelines
TTMLIRStableHLOToTTIR
${STABLEHLO_LIBS}
TTMLIRCompiler
TTMLIRRuntime
)

target_link_libraries(TTPJRTCommon PUBLIC coverage_config)
Expand Down
2 changes: 1 addition & 1 deletion third_party/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# SPDX-License-Identifier: Apache-2.0
#

set(TT_MLIR_VERSION "48ade5e60b133d9d5d0bf3c7c5c8ac4e85c649c3")
set(TT_MLIR_VERSION "62517e0e97a923809fb7eeaed6ae31e59501bfd7")
set(LOGURU_VERSION "4adaa185883e3c04da25913579c451d3c32cfac1")

if (TOOLCHAIN STREQUAL "ON")
Expand Down

0 comments on commit 35cce74

Please sign in to comment.