This commit is contained in:
VoVAllen 2020-07-02 07:37:10 +00:00
parent 8cdfc53a63
commit ed8d661b5d
1 changed files with 1 additions and 2 deletions

View File

@ -221,8 +221,7 @@ Status TfDataTypeFormDlDataType(const DLDataType& dtype,
// Wraps the deleter function of DLManagedTensor to match the function signature // Wraps the deleter function of DLManagedTensor to match the function signature
// TFE_NewTensorHandleFromDeviceMemory. // TFE_NewTensorHandleFromDeviceMemory.
void DeallocatorWrapperFunc(void* data, size_t len, void* dlmt_vptr) { void DeallocatorWrapperFunc(void* data, size_t len, void* dlmt_vptr) {
DLManagedTensor* dlmt = static_cast<DLManagedTensor*>(dlmt_vptr); TFE_CallDLManagedTensorDeleter(dlmt_vptr);
dlmt->deleter(const_cast<DLManagedTensor*>(dlmt));
} }
// Checks whether the stride array matches the layout of compact, row-majored // Checks whether the stride array matches the layout of compact, row-majored