[FRONTEND] Added volatile
flag for load (#407)
This commit is contained in:
@@ -600,7 +600,8 @@ void init_triton_ir(py::module &&m) {
|
||||
|
||||
py::class_<ir::constant_int, ir::constant>(m, "constant_int")
|
||||
.def_property_readonly("value", &ir::constant_int::get_value)
|
||||
.def("__int__", [](ir::constant_int *self) { return self->get_value(); });
|
||||
.def("__int__", [](ir::constant_int *self) { return self->get_value(); })
|
||||
.def("__bool__", [](ir::constant_int *self) { return self->get_value(); });
|
||||
|
||||
py::class_<ir::constant_fp, ir::constant>(m, "constant_float")
|
||||
.def_property_readonly("value", &ir::constant_fp::get_value);
|
||||
|
@@ -519,7 +519,7 @@ def dot(input, other, _builder=None):
|
||||
|
||||
|
||||
@builtin
|
||||
def load(pointer, mask=None, other=None, cache_modifier="", _builder=None):
|
||||
def load(pointer, mask=None, other=None, cache_modifier="", volatile=False, _builder=None):
|
||||
"""
|
||||
Return a block of data whose values are, elementwise, loaded from memory at location defined by :code:`pointer`.
|
||||
|
||||
@@ -536,7 +536,7 @@ def load(pointer, mask=None, other=None, cache_modifier="", _builder=None):
|
||||
:param cache_modifier: changes cache option in nvidia ptx
|
||||
'type cache_modifier: str, optional
|
||||
"""
|
||||
return frontend.load(pointer, mask, other, cache_modifier, _builder)
|
||||
return frontend.load(pointer, mask, other, cache_modifier, volatile, _builder)
|
||||
|
||||
|
||||
@builtin
|
||||
|
Reference in New Issue
Block a user