| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,48 @@ | ||
| # TODO: Make the check source feature optional as an argument on *_add_library. | ||
| set(LLVM_OPTIONAL_SOURCES | ||
| Linalg.cpp | ||
| SCF.cpp | ||
| Shape.cpp | ||
| Standard.cpp | ||
| Tensor.cpp | ||
| ) | ||
|
|
||
| add_mlir_public_c_api_library(MLIRCAPILinalg | ||
| Linalg.cpp | ||
|
|
||
| LINK_LIBS PUBLIC | ||
| MLIRCAPIIR | ||
| MLIRLinalg | ||
| ) | ||
|
|
||
| add_mlir_public_c_api_library(MLIRCAPISCF | ||
| SCF.cpp | ||
|
|
||
| LINK_LIBS PUBLIC | ||
| MLIRCAPIIR | ||
| MLIRSCF | ||
| ) | ||
|
|
||
| add_mlir_public_c_api_library(MLIRCAPIShape | ||
| Shape.cpp | ||
|
|
||
| LINK_LIBS PUBLIC | ||
| MLIRCAPIIR | ||
| MLIRShape | ||
| ) | ||
|
|
||
| add_mlir_public_c_api_library(MLIRCAPIStandard | ||
| Standard.cpp | ||
|
|
||
| LINK_LIBS PUBLIC | ||
| MLIRCAPIIR | ||
| MLIRStandard | ||
| ) | ||
|
|
||
| add_mlir_public_c_api_library(MLIRCAPITensor | ||
| Tensor.cpp | ||
|
|
||
| LINK_LIBS PUBLIC | ||
| MLIRCAPIIR | ||
| MLIRTensor | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| //===- Linalg.cpp - C Interface for Linalg dialect ------------------------===// | ||
| // | ||
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
| // See https://llvm.org/LICENSE.txt for license information. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| #include "mlir-c/Dialect/Linalg.h" | ||
| #include "mlir/CAPI/Registration.h" | ||
| #include "mlir/Dialect/Linalg/IR/LinalgOps.h" | ||
|
|
||
| MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Linalg, linalg, | ||
| mlir::linalg::LinalgDialect); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| //===- SCF.cpp - C Interface for SCF dialect ------------------------------===// | ||
| // | ||
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
| // See https://llvm.org/LICENSE.txt for license information. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| #include "mlir/Dialect/SCF/SCF.h" | ||
| #include "mlir-c/Dialect/SCF.h" | ||
| #include "mlir/CAPI/Registration.h" | ||
|
|
||
| MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(SCF, scf, mlir::scf::SCFDialect); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| //===- Shape.cpp - C Interface for Shape dialect --------------------------===// | ||
| // | ||
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
| // See https://llvm.org/LICENSE.txt for license information. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| #include "mlir/Dialect/Shape/IR/Shape.h" | ||
| #include "mlir-c/Dialect/Shape.h" | ||
| #include "mlir/CAPI/Registration.h" | ||
|
|
||
| MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Shape, shape, mlir::shape::ShapeDialect); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| //===- Standard.cpp - C Interface for Standard dialect --------------------===// | ||
| // | ||
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
| // See https://llvm.org/LICENSE.txt for license information. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| #include "mlir-c/Dialect/Standard.h" | ||
| #include "mlir/CAPI/Registration.h" | ||
| #include "mlir/Dialect/StandardOps/IR/Ops.h" | ||
|
|
||
| MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Standard, std, mlir::StandardOpsDialect); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,14 @@ | ||
| //===- Tensor.cpp - C Interface for Tensor dialect ------------------------===// | ||
| // | ||
| // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. | ||
| // See https://llvm.org/LICENSE.txt for license information. | ||
| // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
| // | ||
| //===----------------------------------------------------------------------===// | ||
|
|
||
| #include "mlir/Dialect/Tensor/IR/Tensor.h" | ||
| #include "mlir-c/Dialect/Tensor.h" | ||
| #include "mlir/CAPI/Registration.h" | ||
|
|
||
| MLIR_DEFINE_CAPI_DIALECT_REGISTRATION(Tensor, tensor, | ||
| mlir::tensor::TensorDialect); |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,4 +1,4 @@ | ||
| include(AddMLIRPythonExtension) | ||
| add_mlir_dialect_python_bindings(MLIRBindingsPythonTestOps | ||
| TD_FILE python_test_ops.td | ||
| DIALECT_NAME python_test) |