Skip to content

Commit

Permalink
Misc cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
peterbell10 committed Mar 14, 2023
1 parent b0068f0 commit e01d246
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 13 deletions.
12 changes: 0 additions & 12 deletions python/src/triton.cc
Original file line number Diff line number Diff line change
Expand Up @@ -866,18 +866,6 @@ void init_triton_ir(py::module &&m) {
auto loc = self.getUnknownLoc();
return self.create<mlir::arith::RemUIOp>(loc, lhs, rhs);
})
.def("create_fmin",
[](mlir::OpBuilder &self, mlir::Value &lhs,
mlir::Value &rhs) -> mlir::Value {
auto loc = self.getUnknownLoc();
return self.create<mlir::arith::MinFOp>(loc, lhs, rhs);
})
.def("create_smin",
[](mlir::OpBuilder &self, mlir::Value &lhs,
mlir::Value &rhs) -> mlir::Value {
auto loc = self.getUnknownLoc();
return self.create<mlir::arith::MinSIOp>(loc, lhs, rhs);
})
.def("create_add",
[](mlir::OpBuilder &self, mlir::Value &lhs,
mlir::Value &rhs) -> mlir::Value {
Expand Down
1 change: 0 additions & 1 deletion python/triton/language/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,6 @@
"philox_impl",
"pi32_t",
"pointer_type",
"prod",
"program_id",
"rand",
"rand4x",
Expand Down
2 changes: 2 additions & 0 deletions python/triton/language/core.py
Original file line number Diff line number Diff line change
Expand Up @@ -1121,12 +1121,14 @@ def _decorator(func: T) -> T:

return _decorator


@contextmanager
def _insertion_guard(builder):
ip = builder.get_insertion_point()
yield
builder.restore_insertion_point(ip)


@builtin
def reduction(input, axis, combine_fn, _builder=None, _generator=None):
"""Applies the combine_fn to all elements in :code:`input` tensors along the provided :code:`axis`
Expand Down

0 comments on commit e01d246

Please sign in to comment.