1 # This file is licensed under the Apache License v2.0 with LLVM Exceptions.
2 # See https://llvm.org/LICENSE.txt for license information.
3 # SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
5 load("//mlir:tblgen.bzl", "gentbl_cc_library", "td_library")
8 default_visibility = ["//visibility:public"],
13 name = "IRProducingAPITest",
19 name = "TestAnalysis",
20 srcs = glob(["lib/Analysis/*.cpp"]),
21 includes = ["lib/Dialect/Test"],
26 "//mlir:AffineAnalysis",
29 "//mlir:MemRefDialect",
36 name = "TestOpTdFiles",
37 srcs = glob(["lib/Dialect/Test/*.td"]),
39 "//mlir:BuiltinDialectTdFiles",
40 "//mlir:CallInterfacesTdFiles",
41 "//mlir:ControlFlowInterfacesTdFiles",
42 "//mlir:CopyOpInterfaceTdFiles",
43 "//mlir:DLTIDialectTdFiles",
44 "//mlir:DataLayoutInterfacesTdFiles",
45 "//mlir:InferTypeOpInterfaceTdFiles",
46 "//mlir:LinalgStructuredOpsTdFiles",
47 "//mlir:OpBaseTdFiles",
48 "//mlir:SideEffectTdFiles",
53 name = "TestOpsIncGen",
54 strip_include_prefix = "lib/Dialect/Test",
58 "lib/Dialect/Test/TestOps.h.inc",
62 "lib/Dialect/Test/TestOps.cpp.inc",
69 "lib/Dialect/Test/TestOpsDialect.h.inc",
76 "lib/Dialect/Test/TestOpsDialect.cpp.inc",
80 "lib/Dialect/Test/TestOpEnums.h.inc",
84 "lib/Dialect/Test/TestOpEnums.cpp.inc",
87 ["-gen-struct-attr-decls"],
88 "lib/Dialect/Test/TestOpStructs.h.inc",
91 ["-gen-struct-attr-defs"],
92 "lib/Dialect/Test/TestOpStructs.cpp.inc",
96 "lib/Dialect/Test/TestPatterns.inc",
99 tblgen = "//mlir:mlir-tblgen",
100 td_file = "lib/Dialect/Test/TestOps.td",
108 name = "TestInterfacesIncGen",
109 strip_include_prefix = "lib/Dialect/Test",
112 ["-gen-attr-interface-decls"],
113 "lib/Dialect/Test/TestAttrInterfaces.h.inc",
116 ["-gen-attr-interface-defs"],
117 "lib/Dialect/Test/TestAttrInterfaces.cpp.inc",
120 ["-gen-type-interface-decls"],
121 "lib/Dialect/Test/TestTypeInterfaces.h.inc",
124 ["-gen-type-interface-defs"],
125 "lib/Dialect/Test/TestTypeInterfaces.cpp.inc",
128 ["-gen-op-interface-decls"],
129 "lib/Dialect/Test/TestOpInterfaces.h.inc",
132 ["-gen-op-interface-defs"],
133 "lib/Dialect/Test/TestOpInterfaces.cpp.inc",
136 tblgen = "//mlir:mlir-tblgen",
137 td_file = "lib/Dialect/Test/TestInterfaces.td",
140 "//mlir:OpBaseTdFiles",
141 "//mlir:SideEffectInterfacesTdFiles",
146 name = "TestAttrDefsIncGen",
147 strip_include_prefix = "lib/Dialect/Test",
150 ["-gen-attrdef-decls"],
151 "lib/Dialect/Test/TestAttrDefs.h.inc",
154 ["-gen-attrdef-defs"],
155 "lib/Dialect/Test/TestAttrDefs.cpp.inc",
158 tblgen = "//mlir:mlir-tblgen",
159 td_file = "lib/Dialect/Test/TestOps.td",
167 name = "TestTypeDefsIncGen",
168 strip_include_prefix = "lib/Dialect/Test",
172 "-gen-typedef-decls",
173 "--typedefs-dialect=test",
175 "lib/Dialect/Test/TestTypeDefs.h.inc",
180 "--typedefs-dialect=test",
182 "lib/Dialect/Test/TestTypeDefs.cpp.inc",
185 tblgen = "//mlir:mlir-tblgen",
186 td_file = "lib/Dialect/Test/TestTypeDefs.td",
190 "//mlir:BuiltinDialectTdFiles",
195 name = "TestDialect",
196 srcs = glob(["lib/Dialect/Test/*.cpp"]),
197 hdrs = glob(["lib/Dialect/Test/*.h"]),
202 ":TestAttrDefsIncGen",
203 ":TestInterfacesIncGen",
205 ":TestTypeDefsIncGen",
207 "//mlir:ArithmeticDialect",
208 "//mlir:ControlFlowInterfaces",
209 "//mlir:CopyOpInterface",
210 "//mlir:DLTIDialect",
211 "//mlir:DataLayoutInterfaces",
212 "//mlir:DerivedAttributeOpInterface",
215 "//mlir:InferTypeOpInterface",
216 "//mlir:LLVMDialect",
217 "//mlir:LinalgInterfaces",
221 "//mlir:SideEffects",
222 "//mlir:StandardOps",
223 "//mlir:StandardOpsTransforms",
225 "//mlir:TensorDialect",
226 "//mlir:TransformUtils",
233 srcs = glob(["lib/IR/*.cpp"]),
241 "//mlir:StandardOps",
248 srcs = glob(["lib/Pass/*.cpp"]),
258 name = "TestRewrite",
260 "lib/Rewrite/TestPDLByteCode.cpp",
264 "//mlir:PDLInterpDialect",
267 "//mlir:TransformUtils",
272 name = "TestReducer",
274 "lib/Reducer/MLIRTestReducer.cpp",
284 name = "TestTransforms",
285 srcs = glob(["lib/Transforms/*.cpp"]),
286 defines = ["MLIR_CUDA_CONVERSIONS_ENABLED"],
287 includes = ["lib/Dialect/Test"],
292 "//mlir:AffineAnalysis",
294 "//mlir:ArithmeticDialect",
296 "//mlir:MathDialect",
299 "//mlir:SPIRVDialect",
300 "//mlir:StandardOps",
301 "//mlir:TransformUtils",
306 name = "TestStandardToLLVM",
307 srcs = glob(["lib/Conversion/StandardToLLVM/*.cpp"]),
308 defines = ["MLIR_CUDA_CONVERSIONS_ENABLED"],
309 includes = ["lib/Dialect/Test"],
312 "//mlir:LLVMCommonConversion",
313 "//mlir:LLVMDialect",
315 "//mlir:StandardOps",
316 "//mlir:StandardToLLVM",
323 "lib/Dialect/Affine/*.cpp",
328 "//mlir:AffineAnalysis",
329 "//mlir:AffineTransforms",
330 "//mlir:AffineUtils",
333 "//mlir:MemRefDialect",
343 srcs = glob(["lib/Dialect/DLTI/*.cpp"]),
344 defines = ["MLIR_CUDA_CONVERSIONS_ENABLED"],
345 includes = ["lib/Dialect/Test"],
349 "//mlir:DLTIDialect",
357 srcs = glob(["lib/Dialect/GPU/*.cpp"]),
358 defines = ["MLIR_CUDA_CONVERSIONS_ENABLED"],
359 includes = ["lib/Dialect/Test"],
361 "//llvm:NVPTXCodeGen",
364 "//mlir:ArithmeticDialect",
366 "//mlir:GPUTransforms",
368 "//mlir:MemRefDialect",
369 "//mlir:NVVMToLLVMIRTranslation",
371 "//mlir:ROCDLToLLVMIRTranslation",
373 "//mlir:SPIRVDialect",
374 "//mlir:StandardOps",
375 "//mlir:ToLLVMIRTranslation",
376 "//mlir:TransformUtils",
382 srcs = glob(["lib/Dialect/Linalg/*.cpp"]),
383 defines = ["MLIR_CUDA_CONVERSIONS_ENABLED"],
384 includes = ["lib/Dialect/Test"],
388 "//mlir:AffineBufferizableOpInterfaceImpl",
389 "//mlir:ArithBufferizableOpInterfaceImpl",
390 "//mlir:ArithmeticDialect",
391 "//mlir:BufferizationDialect",
392 "//mlir:BufferizationTransforms",
395 "//mlir:LinalgBufferizableOpInterfaceImpl",
397 "//mlir:LinalgTransforms",
398 "//mlir:MemRefDialect",
400 "//mlir:SCFBufferizableOpInterfaceImpl",
402 "//mlir:SCFTransforms",
403 "//mlir:StandardOps",
404 "//mlir:StdBufferizableOpInterfaceImpl",
405 "//mlir:TensorDialect",
406 "//mlir:TensorTransforms",
407 "//mlir:TransformUtils",
408 "//mlir:VectorBufferizableOpInterfaceImpl",
410 "//mlir:VectorToSCF",
416 srcs = glob(["lib/Dialect/Math/*.cpp"]),
417 defines = ["MLIR_CUDA_CONVERSIONS_ENABLED"],
418 includes = ["lib/Dialect/Test"],
420 "//mlir:ArithmeticDialect",
421 "//mlir:MathDialect",
422 "//mlir:MathTransforms",
424 "//mlir:TransformUtils",
432 srcs = glob(["lib/Dialect/SCF/*.cpp"]),
433 defines = ["MLIR_CUDA_CONVERSIONS_ENABLED"],
434 includes = ["lib/Dialect/Test"],
437 "//mlir:ArithmeticDialect",
439 "//mlir:MathDialect",
442 "//mlir:SCFTransforms",
443 "//mlir:StandardOps",
444 "//mlir:TransformUtils",
449 name = "TestShapeDialect",
451 "lib/Dialect/Shape/TestShapeFunctions.cpp",
456 "//mlir:InferTypeOpInterface",
465 "lib/Dialect/SPIRV/*.cpp",
471 "//mlir:SPIRVConversion",
472 "//mlir:SPIRVDialect",
473 "//mlir:SPIRVModuleCombiner",
479 name = "TestStandardOps",
480 srcs = glob(["lib/Dialect/StandardOps/*.cpp"]),
481 defines = ["MLIR_CUDA_CONVERSIONS_ENABLED"],
482 includes = ["lib/Dialect/Test"],
488 "//mlir:StandardOps",
489 "//mlir:StandardOpsTransforms",
490 "//mlir:TransformUtils",
496 srcs = glob(["lib/Dialect/Vector/*.cpp"]),
497 defines = ["MLIR_CUDA_CONVERSIONS_ENABLED"],
498 includes = ["lib/Dialect/Test"],
502 "//mlir:LLVMDialect",
504 "//mlir:LinalgTransforms",
505 "//mlir:MemRefDialect",
508 "//mlir:StandardOps",
509 "//mlir:TransformUtils",
511 "//mlir:VectorToSCF",
517 name = "TestTypeDialect",
519 "lib/Dialect/LLVMIR/*.cpp",
524 "//mlir:LLVMDialect",
529 name = "TestTosaDialect",
531 "lib/Dialect/Tosa/*.cpp",
536 "//mlir:StandardOps",
537 "//mlir:TensorDialect",
538 "//mlir:TosaDialect",