Fix OSS build (Linux)

--

PiperOrigin-RevId: 247472005
This commit is contained in:
Nicolas Vasilache 2019-05-09 12:08:13 -07:00 committed by Mehdi Amini
parent a054f7af95
commit 07f777f6cd
4 changed files with 9 additions and 3 deletions

View File

@ -1,5 +1,6 @@
add_subdirectory(EDSC)
add_subdirectory(FxpMathOps)
add_subdirectory(GPU)
add_subdirectory(Linalg)
add_subdirectory(LLVMIR)
add_subdirectory(Quantization)

View File

@ -0,0 +1,4 @@
set(LLVM_TARGET_DEFINITIONS GPUOps.td)
mlir_tablegen(GPUOps.h.inc -gen-op-decls)
mlir_tablegen(GPUOps.cpp.inc -gen-op-defs)
add_public_tablegen_target(MLIRGPUOpsIncGen)

View File

@ -5,5 +5,5 @@ add_llvm_library(MLIRGPU
ADDITIONAL_HEADER_DIRS
${MLIR_MAIN_INCLUDE_DIR}/mlir/GPU
)
add_dependencies(MLIRGPU MLIRIR LLVMSupport)
add_dependencies(MLIRGPU MLIRGPUOpsIncGen MLIRIR LLVMSupport)
target_link_libraries(MLIRGPU MLIRIR LLVMSupport)

View File

@ -79,9 +79,10 @@ static llvm::cl::opt<bool>
llvm::cl::init(false), llvm::cl::Hidden);
namespace {
/// A special index constant used for non-kind attribute aliases.
static constexpr int kNonAttrKindAlias = -1;
class ModuleState {
/// A special index constant used for non-kind attribute aliases.
static constexpr int kNonAttrKindAlias = -1;
public:
/// This is the current context if it is knowable, otherwise this is null.