[CODEGEN/DRIVER] Tweaks for performance optimization (#193)

This commit is contained in:
Philippe Tillet
2021-08-07 16:41:44 -07:00
committed by GitHub
parent 6cd1ec3955
commit 298da78058
8 changed files with 69 additions and 4 deletions

View File

@@ -161,6 +161,7 @@ void init_triton_frontend(py::module &&m) {
m.def("sqrt", &ir::dispatch::sqrt, ret::reference);
// internal (debugging only)
m.def("multiple_of", &ir::dispatch::multiple_of, ret::reference);
m.def("max_contiguous", &ir::dispatch::max_contiguous, ret::reference);
m.def("debug_barrier", &ir::dispatch::debug_barrier, ret::reference);
}

View File

@@ -637,6 +637,14 @@ def multiple_of(input, value, builder=None):
return frontend.multiple_of(input, value, builder)
@builtin
def max_contiguous(input, value, builder=None):
"""
Let the compiler knows that the `value` first values in :code:`input` are contiguous.
"""
return frontend.max_contiguous(input, value, builder)
# -----------------------
# Standard library
# -----------------------