Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 0 additions & 3 deletions src/enzyme_ad/jax/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ cc_library(
srcs = ["gpu.cc"],
copts = ["-Wno-vla-cxx-extension"],
deps = [
"@llvm-project//mlir:CAPIIR",
"@xla//xla/ffi:ffi_api",
"@xla//xla/ffi/api:ffi",
],
Expand All @@ -36,7 +35,6 @@ cc_library(
name = "cpu",
srcs = ["cpu.cc"],
deps = [
"@llvm-project//mlir:CAPIIR",
"@xla//xla/service:custom_call_status",
"@xla//xla/service:custom_call_target_registry",
],
Expand Down Expand Up @@ -603,7 +601,6 @@ cc_library(
"@llvm-project//mlir:VectorToLLVM",
"@llvm-project//mlir:VectorToSCF",
"@llvm-project//mlir:ViewLikeInterface",
"@llvm-project//mlir:CAPIIR",
"@shardy//shardy/dialect/sdy/ir:dialect",
"@shardy//shardy/dialect/sdy/transforms/propagation:op_sharding_rule_builder",
"@stablehlo//:base",
Expand Down
16 changes: 15 additions & 1 deletion src/enzyme_ad/jax/Passes/LowerJIT.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,21 @@

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

#include "mlir-c/Support.h"
#if (defined(_WIN32) || defined(__CYGWIN__)) && \
!defined(MLIR_CAPI_ENABLE_WINDOWS_DLL_DECLSPEC)
// Visibility annotations disabled.
#define MLIR_CAPI_EXPORTED
#elif defined(_WIN32) || defined(__CYGWIN__)
// Windows visibility declarations.
#if MLIR_CAPI_BUILDING_LIBRARY
#define MLIR_CAPI_EXPORTED __declspec(dllexport)
#else
#define MLIR_CAPI_EXPORTED __declspec(dllimport)
#endif
#else
// Non-windows: use visibility attributes.
#define MLIR_CAPI_EXPORTED __attribute__((visibility("default")))
#endif

#define DEBUG_TYPE "lower-jit"

Expand Down
16 changes: 15 additions & 1 deletion src/enzyme_ad/jax/cpu.cc
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,21 @@
#include "xla/service/custom_call_target_registry.h"
#include <cstring>

#include "mlir-c/Support.h"
#if (defined(_WIN32) || defined(__CYGWIN__)) && \
!defined(MLIR_CAPI_ENABLE_WINDOWS_DLL_DECLSPEC)
// Visibility annotations disabled.
#define MLIR_CAPI_EXPORTED
#elif defined(_WIN32) || defined(__CYGWIN__)
// Windows visibility declarations.
#if MLIR_CAPI_BUILDING_LIBRARY
#define MLIR_CAPI_EXPORTED __declspec(dllexport)
#else
#define MLIR_CAPI_EXPORTED __declspec(dllimport)
#endif
#else
// Non-windows: use visibility attributes.
#define MLIR_CAPI_EXPORTED __attribute__((visibility("default")))
#endif

template <bool withError> struct CallInfo;

Expand Down
16 changes: 15 additions & 1 deletion src/enzyme_ad/jax/gpu.cc
Original file line number Diff line number Diff line change
@@ -1,7 +1,21 @@
#include "xla/ffi/api/ffi.h"
#include "xla/ffi/ffi_api.h"

#include "mlir-c/Support.h"
#if (defined(_WIN32) || defined(__CYGWIN__)) && \
!defined(MLIR_CAPI_ENABLE_WINDOWS_DLL_DECLSPEC)
// Visibility annotations disabled.
#define MLIR_CAPI_EXPORTED
#elif defined(_WIN32) || defined(__CYGWIN__)
// Windows visibility declarations.
#if MLIR_CAPI_BUILDING_LIBRARY
#define MLIR_CAPI_EXPORTED __declspec(dllexport)
#else
#define MLIR_CAPI_EXPORTED __declspec(dllimport)
#endif
#else
// Non-windows: use visibility attributes.
#define MLIR_CAPI_EXPORTED __attribute__((visibility("default")))
#endif

template <bool withError> struct CallInfo;

Expand Down
Loading