[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
Loading
Please sign in to comment