Skip to content

Commit

Permalink
Added XlaBuilder.Op.Builder
Browse files Browse the repository at this point in the history
  • Loading branch information
janpfeifer committed Jul 13, 2024
1 parent f62ba33 commit 2461aad
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 1 deletion.
2 changes: 1 addition & 1 deletion cmd/xlabuilder_codegen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ type OpInfo struct {
}

func main() {
// Read node_types.xt
// Read op_types.xt
opsInfo := make([]OpInfo, 0, 200)
f := must.M1(os.OpenFile(OpTypesFileName, os.O_RDONLY, os.ModePerm))
scanner := bufio.NewScanner(f)
Expand Down
1 change: 1 addition & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* Added `Buffer.Device` and `Client.NumForDevice`.
* Properly setting client options for `pjrt.NewClient`. Added test for reading/writing `C.PJRT_NamedValues`.
* Added `xlabuilder.Shape.Memory` and `xlabuilder.NewArrayLiteralFromAny`.
* Added `xlabuilder.Op.Builder()`

# v0.1.2 SuppressAbseilLoggingHack

Expand Down
5 changes: 5 additions & 0 deletions xlabuilder/op.go
Original file line number Diff line number Diff line change
Expand Up @@ -67,6 +67,11 @@ func newOp(opType OpType, opInputs ...*Op) *Op {
return op
}

// Builder returns the XlaBuilder associated with this Op.
func (op *Op) Builder() *XlaBuilder {
return op.builder
}

// opFinalizer by freeing the underlying C++ resources.
func opFinalizer(op *Op) {
if op.cOp == nil {
Expand Down

0 comments on commit 2461aad

Please sign in to comment.