Move the SparseTensorEnums library out of the ExecutionEngine directory and into Dialect/SparseTensor/IR.
Depends On D136002
Differential D136005
[mlir][sparse] Moving Enums.h into Dialect/SparseTensor/IR wrengr on Oct 14 2022, 5:28 PM. Authored by
Details Move the SparseTensorEnums library out of the ExecutionEngine directory and into Dialect/SparseTensor/IR. Depends On D136002
Diff Detail
Event Timeline
Comment Actions I am getting the following CMake error below. CMake Error at llvm-project/mlir/lib/ExecutionEngine/SparseTensor/CMakeLists.txt:12 (add_library): add_library INTERFACE library requires no source arguments. CMake Error at llvm-project/mlir/cmake/modules/AddMLIR.cmake:533 (install): install TARGETS given target "MLIRSparseTensorEnums" which does not exist. Call Stack (most recent call first): llvm-project/mlir/lib/ExecutionEngine/SparseTensor/CMakeLists.txt:17 (add_mlir_library_install) CMake Error at llvm-project/mlir/lib/ExecutionEngine/SparseTensor/CMakeLists.txt:18 (set_property): set_property could not find TARGET MLIRSparseTensorEnums. Perhaps it has not yet been created. -- Performing Test COMPILER_SUPPORTS_WARNING_WEAK_VTABLES -- Performing Test COMPILER_SUPPORTS_WARNING_WEAK_VTABLES - Failed CMake Error at llvm-project/mlir/cmake/modules/CMakeLists.txt:21 (export): export given target "MLIRSparseTensorEnums" which is not built by this project. After reverting this patch and D136002, the errors go away. Any ideas what might be the problem? Comment Actions Hi @psoni2628, The differentials D135995, D135996, D136002, D136005, and D136123 form a related sequence of changes; and D136002 is the one that first added the MLIRSparseTensorEnums target. It looks like your version of cmake differs from mine (and the phabricator buildbot's). So far as I can tell, the fix should be to update mlir/lib/ExecutionEngine/SparseTensor/CMakeLists.txt of D136002 (and consequently mlir/lib/Dialect/SparseTensor/IR/CMakeLists.txt of D136005) to split the add_library line into two parts: add_library(MLIRSparseTensorEnums INTERFACE) target_sources(MLIRSparseTensorEnums INTERFACE ${MLIRSparseTensorEnums_srcs}) I can make a new differential to implement that change, but since I've already landed D136123 the obvious thing would be to update mlir/lib/Dialect/SparseTensor/IR/CMakeLists.txt; however that leaves things in a bad state from when D136002 landed until the new differential does. I'll post the new differential here in a couple minutes, but let me know if there's anything else you need to get things working on your end. Comment Actions Hi @psoni2628, I just posted D136217. Please comment there to let me know if it works for you. Comment Actions I am using CMake 3.18.0, so it's not extremely old. After applying D136217, there is a different error message now, shown below. -- LLVM host triple: x86_64-unknown-linux-gnu -- LLVM default target triple: x86_64-unknown-linux-gnu -- Building with -fPIC -- Targeting X86 -- Clang version: 16.0.0 -- Not building amdgpu-arch: hsa-runtime64 not found CMake Error at llvm-project/mlir/lib/Dialect/SparseTensor/IR/CMakeLists.txt:24 (set_property): INTERFACE_LIBRARY targets may only have whitelisted properties. The property "CXX_STANDARD" is not allowed. Maybe I should just upgrade my version of CMake. Which version of CMake are you using where it works? |
probably want to make this onliner no longer reference runtime, but just say "enums" in some manner
(you explain that well enought at L9 and down)