|
| 1 | +# NOTE: Do not depend on any targets from this directory, |
| 2 | +# but use //third_party/py/triton instead. |
| 3 | + |
| 4 | +load("@pybind11_bazel//:build_defs.bzl", "pybind_extension") |
| 5 | + |
| 6 | +package( |
| 7 | + default_applicable_licenses = ["//:license"], |
| 8 | + default_visibility = [ |
| 9 | + "//third_party/py/triton:__pkg__", |
| 10 | + "@triton//python:__subpackages__", |
| 11 | + ], |
| 12 | +) |
| 13 | + |
| 14 | +cc_library( |
| 15 | + name = "passes", |
| 16 | + hdrs = ["src/passes.h"], |
| 17 | + includes = ["src"], |
| 18 | + visibility = ["@triton//third_party:__subpackages__"], |
| 19 | +) |
| 20 | + |
| 21 | +pybind_extension( |
| 22 | + name = "libtriton", |
| 23 | + srcs = [ |
| 24 | + "src/interpreter.cc", |
| 25 | + "src/ir.cc", |
| 26 | + "src/llvm.cc", |
| 27 | + "src/main.cc", |
| 28 | + "src/passes.cc", |
| 29 | + ], |
| 30 | + copts = ["-DTRITON_BACKENDS_TUPLE=(nvidia)"], |
| 31 | + deps = [ |
| 32 | + ":passes", |
| 33 | + "@llvm-project//llvm:Core", |
| 34 | + "@llvm-project//llvm:IPO", |
| 35 | + "@llvm-project//llvm:IRReader", |
| 36 | + "@llvm-project//llvm:InstCombine", |
| 37 | + "@llvm-project//llvm:Linker", |
| 38 | + "@llvm-project//llvm:MC", |
| 39 | + "@llvm-project//llvm:Passes", |
| 40 | + "@llvm-project//llvm:Support", |
| 41 | + "@llvm-project//llvm:Target", |
| 42 | + "@llvm-project//mlir:BuiltinToLLVMIRTranslation", |
| 43 | + "@llvm-project//mlir:BytecodeWriter", |
| 44 | + "@llvm-project//mlir:ControlFlowDialect", |
| 45 | + "@llvm-project//mlir:ConversionPasses", |
| 46 | + "@llvm-project//mlir:IR", |
| 47 | + "@llvm-project//mlir:IndexDialect", |
| 48 | + "@llvm-project//mlir:LLVMDialect", |
| 49 | + "@llvm-project//mlir:LLVMIRTransforms", |
| 50 | + "@llvm-project//mlir:LLVMToLLVMIRTranslation", |
| 51 | + "@llvm-project//mlir:NVVMToLLVMIRTranslation", |
| 52 | + "@llvm-project//mlir:Parser", |
| 53 | + "@llvm-project//mlir:Pass", |
| 54 | + "@llvm-project//mlir:Support", |
| 55 | + "@llvm-project//mlir:ToLLVMIRTranslation", |
| 56 | + "@llvm-project//mlir:Transforms", |
| 57 | + "//:TritonAnalysis", |
| 58 | + "//:TritonDialects", |
| 59 | + "//:TritonGPUToLLVM", |
| 60 | + "//:TritonGPUTransforms", |
| 61 | + "//:TritonHSACO", |
| 62 | + "//:TritonLLVMIR", |
| 63 | + "//:TritonNvidiaGPUTransforms", |
| 64 | + "//:TritonPTX", |
| 65 | + "//:TritonToTritonGPU", |
| 66 | + "//:TritonTools", |
| 67 | + "//:TritonTransforms", |
| 68 | + "@triton//third_party/nvidia:triton_nvidia", |
| 69 | + ], |
| 70 | +) |
| 71 | + |
| 72 | +filegroup( |
| 73 | + name = "files", |
| 74 | + srcs = glob( |
| 75 | + include = ["triton/**/*.py"], |
| 76 | + ), |
| 77 | +) |
0 commit comments