mirror of
https://github.com/zebrajr/tensorflow.git
synced 2025-12-06 12:20:11 +01:00
[xla:ffi] Revert ABI version change
Also relax the FFI version check. PiperOrigin-RevId: 821905272
This commit is contained in:
parent
14710459b6
commit
5caf2a70d8
4
third_party/xla/xla/ffi/api/c_api.h
vendored
4
third_party/xla/xla/ffi/api/c_api.h
vendored
|
|
@ -67,7 +67,7 @@ XLA_FFI_DEFINE_STRUCT_TRAITS(XLA_FFI_Extension_Base, next);
|
|||
// * Deleting a method or argument
|
||||
// * Changing the type of an argument
|
||||
// * Rearranging fields in the XLA_FFI_Api or argument structs
|
||||
#define XLA_FFI_API_MAJOR 1
|
||||
#define XLA_FFI_API_MAJOR 0
|
||||
|
||||
// Incremented when the interface is updated in a way that is potentially
|
||||
// ABI-compatible with older versions, if supported by the caller and/or
|
||||
|
|
@ -82,7 +82,7 @@ XLA_FFI_DEFINE_STRUCT_TRAITS(XLA_FFI_Extension_Base, next);
|
|||
// Minor changes include:
|
||||
// * Adding a new field to the XLA_FFI_Api or argument structs
|
||||
// * Renaming a method or argument (doesn't affect ABI)
|
||||
#define XLA_FFI_API_MINOR 0
|
||||
#define XLA_FFI_API_MINOR 2
|
||||
|
||||
struct XLA_FFI_Api_Version {
|
||||
size_t struct_size;
|
||||
|
|
|
|||
4
third_party/xla/xla/ffi/ffi_api.cc
vendored
4
third_party/xla/xla/ffi/ffi_api.cc
vendored
|
|
@ -384,8 +384,8 @@ static absl::Status RegisterHandler(absl::string_view name,
|
|||
// Check the API versions.
|
||||
TF_ASSIGN_OR_RETURN(XLA_FFI_Metadata metadata, GetMetadata(bundle.execute));
|
||||
const XLA_FFI_Api_Version& api_version = metadata.api_version;
|
||||
if (api_version.major_version != XLA_FFI_API_MAJOR ||
|
||||
api_version.minor_version != XLA_FFI_API_MINOR) {
|
||||
if (std::make_pair(api_version.major_version, api_version.minor_version) >
|
||||
std::make_pair(XLA_FFI_API_MAJOR, XLA_FFI_API_MINOR)) {
|
||||
return InvalidArgument(
|
||||
"FFI handler registration for %s on platform %s (canonical %s) failed "
|
||||
"because the handler's API version (%d.%d) is incompatible with the "
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user