forked from triton-lang/triton
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
25 changed files
with
1,595 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
# NOTE: Do not depend on any targets from this directory, | ||
# but use //third_party/py/triton instead. | ||
|
||
load("@pybind11_bazel//:build_defs.bzl", "pybind_extension") | ||
|
||
package( | ||
default_applicable_licenses = ["//:license"], | ||
default_visibility = [ | ||
"//third_party/py/triton:__pkg__", | ||
"@triton//python:__subpackages__", | ||
], | ||
) | ||
|
||
cc_library( | ||
name = "passes", | ||
hdrs = ["src/passes.h"], | ||
includes = ["src"], | ||
visibility = ["@triton//third_party:__subpackages__"], | ||
) | ||
|
||
pybind_extension( | ||
name = "libtriton", | ||
srcs = [ | ||
"src/interpreter.cc", | ||
"src/ir.cc", | ||
"src/llvm.cc", | ||
"src/main.cc", | ||
"src/passes.cc", | ||
], | ||
copts = ["-DTRITON_BACKENDS_TUPLE=(nvidia)"], | ||
deps = [ | ||
":passes", | ||
"@llvm-project//llvm:Core", | ||
"@llvm-project//llvm:IPO", | ||
"@llvm-project//llvm:IRReader", | ||
"@llvm-project//llvm:InstCombine", | ||
"@llvm-project//llvm:Linker", | ||
"@llvm-project//llvm:MC", | ||
"@llvm-project//llvm:Passes", | ||
"@llvm-project//llvm:Support", | ||
"@llvm-project//llvm:Target", | ||
"@llvm-project//mlir:BuiltinToLLVMIRTranslation", | ||
"@llvm-project//mlir:BytecodeWriter", | ||
"@llvm-project//mlir:ControlFlowDialect", | ||
"@llvm-project//mlir:ConversionPasses", | ||
"@llvm-project//mlir:IR", | ||
"@llvm-project//mlir:IndexDialect", | ||
"@llvm-project//mlir:LLVMDialect", | ||
"@llvm-project//mlir:LLVMToLLVMIRTranslation", | ||
"@llvm-project//mlir:NVVMToLLVMIRTranslation", | ||
"@llvm-project//mlir:Parser", | ||
"@llvm-project//mlir:Pass", | ||
"@llvm-project//mlir:Support", | ||
"@llvm-project//mlir:ToLLVMIRTranslation", | ||
"@llvm-project//mlir:Transforms", | ||
"//:TritonAnalysis", | ||
"//:TritonDialects", | ||
"//:TritonGPUToLLVM", | ||
"//:TritonGPUTransforms", | ||
"//:TritonHSACO", | ||
"//:TritonLLVMIR", | ||
"//:TritonNvidiaGPUTransforms", | ||
"//:TritonPTX", | ||
"//:TritonToTritonGPU", | ||
"//:TritonTools", | ||
"//:TritonTransforms", | ||
"@triton//third_party/nvidia:triton_nvidia", | ||
], | ||
) | ||
|
||
pybind_extension( | ||
name = "triton_launcher", | ||
srcs = [ | ||
"triton/compiler/triton_launcher.c", | ||
], | ||
tags = [ | ||
"config-cuda-only", | ||
"requires-gpu-sm80", | ||
], | ||
deps = [ | ||
"@local_config_cuda//cuda:cuda_headers", | ||
"@local_config_cuda//cuda:cuda_runtime", | ||
], | ||
) | ||
|
||
filegroup( | ||
name = "files", | ||
srcs = glob( | ||
include = ["triton/**/*.py"], | ||
), | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
load("//third_party/py/pytest:pytest_defs.bzl", "pytest_multi_tests") | ||
|
||
package( | ||
default_applicable_licenses = ["//:license"], | ||
) | ||
|
||
pytest_multi_tests( | ||
name = "tests", | ||
size = "large", | ||
shard_count = 10, | ||
tags = [ | ||
"config-cuda-only", | ||
"requires-gpu-sm80", | ||
], | ||
tests = glob( | ||
include = ["test_*.py"], | ||
exclude = [ | ||
"test_performance.py", #TODO(b/321005767): fix failing test | ||
"test_cast_matmul.py", #Broken upstream and disabled on OAI CI | ||
], | ||
), | ||
deps = [ | ||
"//third_party/py/torch:pytorch", | ||
"//third_party/py/triton", | ||
], | ||
) |
Oops, something went wrong.