-
Notifications
You must be signed in to change notification settings - Fork 15.5k
[mlir] enable APFloatWrappers on MacOS #172070
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
@llvm/pr-subscribers-mlir Author: Maksim Levental (makslevental) ChangesFull diff: https://github.com/llvm/llvm-project/pull/172070.diff 4 Files Affected:
diff --git a/mlir/lib/ExecutionEngine/CMakeLists.txt b/mlir/lib/ExecutionEngine/CMakeLists.txt
index a6153523a5e97..3ce4079f16644 100644
--- a/mlir/lib/ExecutionEngine/CMakeLists.txt
+++ b/mlir/lib/ExecutionEngine/CMakeLists.txt
@@ -168,8 +168,8 @@ if(LLVM_ENABLE_PIC)
set_property(TARGET mlir_float16_utils PROPERTY CXX_STANDARD 17)
target_compile_definitions(mlir_float16_utils PRIVATE mlir_float16_utils_EXPORTS)
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- # TODO: This support library is only used on Linux builds until we figure
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ # TODO: This support library is only used on Linux and Mac builds until we figure
# out how to hide LLVM symbols in a way that works for all platforms.
add_mlir_library(mlir_apfloat_wrappers
SHARED
@@ -185,7 +185,7 @@ if(LLVM_ENABLE_PIC)
)
target_compile_definitions(mlir_apfloat_wrappers PRIVATE mlir_apfloat_wrappers_EXPORTS)
# Hide LLVM symbols to avoid ODR violations.
- target_link_options(mlir_apfloat_wrappers PRIVATE "-Wl,--exclude-libs,ALL")
+ target_link_options(mlir_apfloat_wrappers PRIVATE $<$<PLATFORM_ID:Linux>:LINKER:--exclude-libs,ALL>)
endif()
add_subdirectory(SparseTensor)
@@ -205,8 +205,8 @@ if(LLVM_ENABLE_PIC)
set_property(TARGET mlir_c_runner_utils PROPERTY CXX_STANDARD 17)
target_compile_definitions(mlir_c_runner_utils PRIVATE mlir_c_runner_utils_EXPORTS)
- # Conditionally link apfloat wrappers only on Linux.
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ # Conditionally link apfloat wrappers only on Linux and Mac.
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
target_link_libraries(mlir_c_runner_utils PUBLIC mlir_apfloat_wrappers)
endif()
diff --git a/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation-vector.mlir b/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation-vector.mlir
index 5f8b2f4efcf24..dfd9e7c4aaa14 100644
--- a/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation-vector.mlir
+++ b/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation-vector.mlir
@@ -1,4 +1,4 @@
-// REQUIRES: system-linux
+// REQUIRES: system-linux || system-darwin
// TODO: Run only on Linux until we figure out how to build
// mlir_apfloat_wrappers in a platform-independent way.
diff --git a/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation.mlir b/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation.mlir
index 7f72dd5931488..e6c60001e5aee 100644
--- a/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation.mlir
+++ b/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation.mlir
@@ -1,4 +1,4 @@
-// REQUIRES: system-linux
+// REQUIRES: system-linux || system-darwin
// TODO: Run only on Linux until we figure out how to build
// mlir_apfloat_wrappers in a platform-independent way.
diff --git a/mlir/test/lit.cfg.py b/mlir/test/lit.cfg.py
index 675ded35d98f3..9c5bee169efe0 100644
--- a/mlir/test/lit.cfg.py
+++ b/mlir/test/lit.cfg.py
@@ -214,8 +214,8 @@ def find_real_python_interpreter():
"not",
]
-if "Linux" in config.host_os:
- # TODO: Run only on Linux until we figure out how to build
+if "Linux" in config.host_os or "Darwin" in config.host_os:
+ # TODO: Run only on Linux and Mac until we figure out how to build
# mlir_apfloat_wrappers in a platform-independent way.
tools.extend([add_runtime("mlir_apfloat_wrappers")])
|
|
@llvm/pr-subscribers-mlir-execution-engine Author: Maksim Levental (makslevental) ChangesFull diff: https://github.com/llvm/llvm-project/pull/172070.diff 4 Files Affected:
diff --git a/mlir/lib/ExecutionEngine/CMakeLists.txt b/mlir/lib/ExecutionEngine/CMakeLists.txt
index a6153523a5e97..3ce4079f16644 100644
--- a/mlir/lib/ExecutionEngine/CMakeLists.txt
+++ b/mlir/lib/ExecutionEngine/CMakeLists.txt
@@ -168,8 +168,8 @@ if(LLVM_ENABLE_PIC)
set_property(TARGET mlir_float16_utils PROPERTY CXX_STANDARD 17)
target_compile_definitions(mlir_float16_utils PRIVATE mlir_float16_utils_EXPORTS)
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- # TODO: This support library is only used on Linux builds until we figure
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ # TODO: This support library is only used on Linux and Mac builds until we figure
# out how to hide LLVM symbols in a way that works for all platforms.
add_mlir_library(mlir_apfloat_wrappers
SHARED
@@ -185,7 +185,7 @@ if(LLVM_ENABLE_PIC)
)
target_compile_definitions(mlir_apfloat_wrappers PRIVATE mlir_apfloat_wrappers_EXPORTS)
# Hide LLVM symbols to avoid ODR violations.
- target_link_options(mlir_apfloat_wrappers PRIVATE "-Wl,--exclude-libs,ALL")
+ target_link_options(mlir_apfloat_wrappers PRIVATE $<$<PLATFORM_ID:Linux>:LINKER:--exclude-libs,ALL>)
endif()
add_subdirectory(SparseTensor)
@@ -205,8 +205,8 @@ if(LLVM_ENABLE_PIC)
set_property(TARGET mlir_c_runner_utils PROPERTY CXX_STANDARD 17)
target_compile_definitions(mlir_c_runner_utils PRIVATE mlir_c_runner_utils_EXPORTS)
- # Conditionally link apfloat wrappers only on Linux.
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ # Conditionally link apfloat wrappers only on Linux and Mac.
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
target_link_libraries(mlir_c_runner_utils PUBLIC mlir_apfloat_wrappers)
endif()
diff --git a/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation-vector.mlir b/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation-vector.mlir
index 5f8b2f4efcf24..dfd9e7c4aaa14 100644
--- a/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation-vector.mlir
+++ b/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation-vector.mlir
@@ -1,4 +1,4 @@
-// REQUIRES: system-linux
+// REQUIRES: system-linux || system-darwin
// TODO: Run only on Linux until we figure out how to build
// mlir_apfloat_wrappers in a platform-independent way.
diff --git a/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation.mlir b/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation.mlir
index 7f72dd5931488..e6c60001e5aee 100644
--- a/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation.mlir
+++ b/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation.mlir
@@ -1,4 +1,4 @@
-// REQUIRES: system-linux
+// REQUIRES: system-linux || system-darwin
// TODO: Run only on Linux until we figure out how to build
// mlir_apfloat_wrappers in a platform-independent way.
diff --git a/mlir/test/lit.cfg.py b/mlir/test/lit.cfg.py
index 675ded35d98f3..9c5bee169efe0 100644
--- a/mlir/test/lit.cfg.py
+++ b/mlir/test/lit.cfg.py
@@ -214,8 +214,8 @@ def find_real_python_interpreter():
"not",
]
-if "Linux" in config.host_os:
- # TODO: Run only on Linux until we figure out how to build
+if "Linux" in config.host_os or "Darwin" in config.host_os:
+ # TODO: Run only on Linux and Mac until we figure out how to build
# mlir_apfloat_wrappers in a platform-independent way.
tools.extend([add_runtime("mlir_apfloat_wrappers")])
|
|
@llvm/pr-subscribers-mlir-arith Author: Maksim Levental (makslevental) ChangesFull diff: https://github.com/llvm/llvm-project/pull/172070.diff 4 Files Affected:
diff --git a/mlir/lib/ExecutionEngine/CMakeLists.txt b/mlir/lib/ExecutionEngine/CMakeLists.txt
index a6153523a5e97..3ce4079f16644 100644
--- a/mlir/lib/ExecutionEngine/CMakeLists.txt
+++ b/mlir/lib/ExecutionEngine/CMakeLists.txt
@@ -168,8 +168,8 @@ if(LLVM_ENABLE_PIC)
set_property(TARGET mlir_float16_utils PROPERTY CXX_STANDARD 17)
target_compile_definitions(mlir_float16_utils PRIVATE mlir_float16_utils_EXPORTS)
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
- # TODO: This support library is only used on Linux builds until we figure
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
+ # TODO: This support library is only used on Linux and Mac builds until we figure
# out how to hide LLVM symbols in a way that works for all platforms.
add_mlir_library(mlir_apfloat_wrappers
SHARED
@@ -185,7 +185,7 @@ if(LLVM_ENABLE_PIC)
)
target_compile_definitions(mlir_apfloat_wrappers PRIVATE mlir_apfloat_wrappers_EXPORTS)
# Hide LLVM symbols to avoid ODR violations.
- target_link_options(mlir_apfloat_wrappers PRIVATE "-Wl,--exclude-libs,ALL")
+ target_link_options(mlir_apfloat_wrappers PRIVATE $<$<PLATFORM_ID:Linux>:LINKER:--exclude-libs,ALL>)
endif()
add_subdirectory(SparseTensor)
@@ -205,8 +205,8 @@ if(LLVM_ENABLE_PIC)
set_property(TARGET mlir_c_runner_utils PROPERTY CXX_STANDARD 17)
target_compile_definitions(mlir_c_runner_utils PRIVATE mlir_c_runner_utils_EXPORTS)
- # Conditionally link apfloat wrappers only on Linux.
- if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
+ # Conditionally link apfloat wrappers only on Linux and Mac.
+ if(CMAKE_SYSTEM_NAME STREQUAL "Linux" OR CMAKE_SYSTEM_NAME STREQUAL "Darwin")
target_link_libraries(mlir_c_runner_utils PUBLIC mlir_apfloat_wrappers)
endif()
diff --git a/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation-vector.mlir b/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation-vector.mlir
index 5f8b2f4efcf24..dfd9e7c4aaa14 100644
--- a/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation-vector.mlir
+++ b/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation-vector.mlir
@@ -1,4 +1,4 @@
-// REQUIRES: system-linux
+// REQUIRES: system-linux || system-darwin
// TODO: Run only on Linux until we figure out how to build
// mlir_apfloat_wrappers in a platform-independent way.
diff --git a/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation.mlir b/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation.mlir
index 7f72dd5931488..e6c60001e5aee 100644
--- a/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation.mlir
+++ b/mlir/test/Integration/Dialect/Arith/CPU/test-apfloat-emulation.mlir
@@ -1,4 +1,4 @@
-// REQUIRES: system-linux
+// REQUIRES: system-linux || system-darwin
// TODO: Run only on Linux until we figure out how to build
// mlir_apfloat_wrappers in a platform-independent way.
diff --git a/mlir/test/lit.cfg.py b/mlir/test/lit.cfg.py
index 675ded35d98f3..9c5bee169efe0 100644
--- a/mlir/test/lit.cfg.py
+++ b/mlir/test/lit.cfg.py
@@ -214,8 +214,8 @@ def find_real_python_interpreter():
"not",
]
-if "Linux" in config.host_os:
- # TODO: Run only on Linux until we figure out how to build
+if "Linux" in config.host_os or "Darwin" in config.host_os:
+ # TODO: Run only on Linux and Mac until we figure out how to build
# mlir_apfloat_wrappers in a platform-independent way.
tools.extend([add_runtime("mlir_apfloat_wrappers")])
|
|
LLVM Buildbot has detected a new failure on builder Full details are available at: https://lab.llvm.org/buildbot/#/builders/169/builds/17966 Here is the relevant piece of the build log for the reference |
No description provided.