Skip to content

Commit

Permalink
Merge pull request #26345 from neerajprad:xla-cl
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 236921620
  • Loading branch information
tensorflower-gardener committed Mar 5, 2019
2 parents 8722eef + bed882f commit 6b4107e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tensorflow/compiler/xla/python/xla_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -431,7 +431,9 @@ def device(self):

def delete(self):
if self.c_buffer is not None:
self._backend.delete_buffer(self.c_buffer)
# Python may have freed c_api first.
if c_api:
self._backend.delete_buffer(self.c_buffer)
self.c_buffer = None

def destructure(self):
Expand Down

0 comments on commit 6b4107e

Please sign in to comment.