Add argc and argv arguments to pass to tpu library on startup
PiperOrigin-RevId: 345777151 Change-Id: I150fac0e0a9559c3968509c2b8e011b20620156b
This commit is contained in:
parent
cd39d7a4c8
commit
304b968153
@ -41,7 +41,8 @@ limitations under the License.
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
TFTPU_CAPI_EXPORT void TfTpu_Initialize(bool init_library);
|
||||
TFTPU_CAPI_EXPORT void TfTpu_Initialize(bool init_library, int argc,
|
||||
char** argv);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ Status InitializeTpuLibrary(void* library_handle) {
|
||||
void (*initialize_fn)(bool init_library);
|
||||
initialize_fn = reinterpret_cast<decltype(initialize_fn)>(
|
||||
dlsym(library_handle, "TfTpu_Initialize"));
|
||||
(*initialize_fn)(/*init_library=*/true);
|
||||
(*initialize_fn)(/*init_library=*/true, /*argc=*/0, /*argv=*/nullptr);
|
||||
|
||||
RegisterTpuPlatform();
|
||||
RegisterTpuSystemDevice();
|
||||
|
@ -45,8 +45,8 @@ Status InitializeTpuLibrary(void* library_handle) {
|
||||
// supporting library providing the necessary APIs.
|
||||
if (s.ok()) {
|
||||
void (*initialize_fn)();
|
||||
initialize_fn = reinterpret_cast<decltype(initialize_fn)>(
|
||||
dlsym(library_handle, "TfTpu_Initialize"));
|
||||
initialize_fn = reinterpret_cast<decltype(initialize_fn)>(dlsym(
|
||||
library_handle, "TfTpu_Initialize", /*argc=*/0, /*argv=*/nullptr));
|
||||
(*initialize_fn)();
|
||||
|
||||
RegisterTpuPlatform();
|
||||
|
Loading…
x
Reference in New Issue
Block a user