Commit b0cfc0bf authored by Peter Hawkins's avatar Peter Hawkins Committed by TensorFlower Gardener
Browse files

[TF:XLA] Small refactorings of XlaContext and XlaOpKernelContext. No functional changes intended.

* Add an XlaOpKernelContext::xla_context() method, and change most users of XlaContext::Get() to use XlaOpKernelContext methods instead.
* Remove XlaContext::CreateResource, which had a confusing API that mirror XlaResource's constructor. Replace it with XlaContext::AddResource, which takes ownership of a resource, and add helper methods to build XlaResources.
* Rename XlaResource::tensor_array_size to XlaResource::max_array_size, since it also applies to stacks as well as tensor arrays.
* Remove XlaContext::RepresentationShape and XlaContext::allow_cpu_custom_calls. XlaContext already has a reference to the XlaCompiler, and these can be determined from XlaCompiler::options(), and are therefore redundant.

PiperOrigin-RevId: 222997360
parent ad1a165f
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment