Skip to content

Commit 660c483

Browse files
committed
Fix free_buffer
1 parent 47ce23b commit 660c483

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Diff for: src/xla/Buffer.jl

+1-4
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,9 @@ mutable struct Buffer
2323
end
2424

2525
@inline function free_buffer(buffer)
26-
if buffer.holded == C_NULL && buffer.buffer != C_NULL
26+
if isnothing(buffer.holded) && buffer.buffer != C_NULL
2727
@ccall MLIR.API.mlir_c.PjRtBufferFree(buffer.buffer::Ptr{Cvoid})::Cvoid
2828
end
29-
# else
30-
# @ccall MLIR.API.mlir_c.reactant_release_pjrtbuffer(buffer.holded::Ptr{Cvoid})::Cvoid
31-
# end
3229
end
3330

3431
function hold!(buffer::Buffer)

0 commit comments

Comments
 (0)