@@ -53,7 +53,7 @@ extern "C" {
5353// Changes include:
5454// * Adding a new field to the PJRT_Api or argument structs
5555// * Renaming a method or argument (doesn't affect ABI)
56- #define PJRT_API_MINOR 34
56+ #define PJRT_API_MINOR 35
5757
5858// The plugin should set the major_version and minor_version of
5959// PJRT_Api.pjrt_api_version to be the `PJRT_API_MAJOR` and `PJRT_API_MINOR` in
@@ -1315,6 +1315,24 @@ PJRT_DEFINE_STRUCT_TRAITS(PJRT_Executable_SizeOfGeneratedCodeInBytes_Args,
13151315typedef PJRT_Error* PJRT_Executable_SizeOfGeneratedCodeInBytes (
13161316 PJRT_Executable_SizeOfGeneratedCodeInBytes_Args* args);
13171317
1318+ struct PJRT_Executable_Fingerprint_Args {
1319+ size_t struct_size;
1320+ void * priv;
1321+ PJRT_Executable* executable;
1322+ // Has the lifetime of `executable`
1323+ const char * executable_fingerprint; // out
1324+ size_t executable_fingerprint_size; // out
1325+ };
1326+ PJRT_DEFINE_STRUCT_TRAITS (PJRT_Executable_Fingerprint_Args,
1327+ executable_fingerprint_size);
1328+
1329+ // A unique fingerprint for `executable`. Two executables that were produced by
1330+ // compiling with identical inputs (same program, compile options, compiler
1331+ // version, etc.) should have the same fingerprint. May not be implemented by
1332+ // all platforms.
1333+ typedef PJRT_Error* PJRT_Executable_Fingerprint (
1334+ PJRT_Executable_Fingerprint_Args* args);
1335+
13181336struct PJRT_Executable_GetCostAnalysis_Args {
13191337 size_t struct_size;
13201338 void * priv;
@@ -1434,10 +1452,11 @@ struct PJRT_LoadedExecutable_Fingerprint_Args {
14341452};
14351453PJRT_DEFINE_STRUCT_TRAITS (PJRT_LoadedExecutable_Fingerprint_Args,
14361454 executable_fingerprint_size);
1437- // A unique fingerprint for `executable`. Two executables that were produced by
1438- // compiling with identical inputs (same program, compile options, compiler
1439- // version, etc.) should have the same fingerprint. May not be implemented by
1440- // all platforms.
1455+ // DEPRECATED. Will be removed in PJRT version 2.0. Please use
1456+ // PJRT_Executable_Fingerprint instead. A unique fingerprint for `executable`.
1457+ // Two executables that were produced by compiling with identical inputs (same
1458+ // program, compile options, compiler version, etc.) should have the same
1459+ // fingerprint. May not be implemented by all platforms.
14411460typedef PJRT_Error* PJRT_LoadedExecutable_Fingerprint (
14421461 PJRT_LoadedExecutable_Fingerprint_Args* args);
14431462
@@ -2090,6 +2109,8 @@ typedef struct {
20902109 _PJRT_API_STRUCT_FIELD (PJRT_Buffer_CopyToMemory);
20912110
20922111 _PJRT_API_STRUCT_FIELD (PJRT_Client_CreateViewOfDeviceBuffer);
2112+
2113+ _PJRT_API_STRUCT_FIELD (PJRT_Executable_Fingerprint);
20932114} PJRT_Api;
20942115
20952116const size_t PJRT_Api_STRUCT_SIZE =
0 commit comments