This change also removes the `Device::RequiresRecordingAccessedTensors()` and `Device::ConsumeListOfAccessedTensors()` methods.
Some device objects (historically, GPUs with experimental multi-stream support) required the ability to record which tensors were used during kernel execution. This support has bit-rotted since it was introduced, and causes runtime overhead for most devices that do not use the feature.
PiperOrigin-RevId: 300443774
Change-Id: Ia44ff65dee57f4d9f971f0079f79edd2fde2a1dc
Before this change, TF_AllocateOutput would simply allocate a tensor but not
place that tensor in the specified output position. This change necessitates
the addition of a TF_Status* output parameter.
PiperOrigin-RevId: 269403835
output tensor using OpKernelContext allocator.
As a part of this change, I also moved allocate_tensor and deallocate_tensor to tensorflow namespace and added corresponding declarations to tf_tensor_internal.h. This is so that TF_AllocateOutput in kernels.cc can call access these allocate/deallocate functions.
PiperOrigin-RevId: 260973924
OpKernelContext does not have GetAttr(). Previously, the
DEFINE_TF_GETATTR_ macro would define a function called
TF_OpKernelContext_GetWhateverAttr, but its implementation was
erroneously casting to OpKernelConstruction. This was never going to
work.
PiperOrigin-RevId: 232901435
After this change, TF_DeleteKernelBuilder will comply with the
conventions established in c_api.h, namely that *Delete* functions are
safe with nullptr parameters.
PiperOrigin-RevId: 230009727
This change adds:
* TF_OpKernel{Context,Construction}_Failure - used by C kernels to
report failures in their compute or construction functions
* TF_OpKernel{Context,Construction_GetAttrType - used by C kernels to
read TF_DataType attributes from their compute or construction
context. A macro is used for the implementation, as there will be a
handful of these methods in subsequent CLs and their implementation is
boilerplate.
PiperOrigin-RevId: 229311735