Skip to content

Commit c93d807

Browse files
authored
export map symbol (#1313)
* export map symbol * fmt * fix
1 parent d16b60f commit c93d807

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

src/enzyme_ad/jax/BUILD

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,7 @@ cc_library(
603603
"@llvm-project//mlir:VectorToLLVM",
604604
"@llvm-project//mlir:VectorToSCF",
605605
"@llvm-project//mlir:ViewLikeInterface",
606+
"@llvm-project//mlir:CAPIIR",
606607
"@shardy//shardy/dialect/sdy/ir:dialect",
607608
"@shardy//shardy/dialect/sdy/transforms/propagation:op_sharding_rule_builder",
608609
"@stablehlo//:base",

src/enzyme_ad/jax/Passes/LowerJIT.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,8 @@
8080

8181
#include "mlir/Target/LLVMIR/Export.h"
8282

83+
#include "mlir-c/Support.h"
84+
8385
#define DEBUG_TYPE "lower-jit"
8486

8587
namespace mlir {
@@ -274,7 +276,8 @@ bool initJIT() {
274276
return true;
275277
}
276278

277-
extern "C" void EnzymeJaXMapSymbol(const char *name, void *symbol) {
279+
extern "C" MLIR_CAPI_EXPORTED void EnzymeJaXMapSymbol(const char *name,
280+
void *symbol) {
278281
initJIT();
279282
MappedSymbols[JIT->mangleAndIntern(name)] = llvm::orc::ExecutorSymbolDef(
280283
llvm::orc::ExecutorAddr::fromPtr(symbol), llvm::JITSymbolFlags());

0 commit comments

Comments
 (0)