File tree Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Expand file tree Collapse file tree 1 file changed +10
-4
lines changed Original file line number Diff line number Diff line change @@ -391,19 +391,25 @@ static executorch::runtime::Error success_with_compiler =
391391#endif
392392
393393extern " C" CUDA_BACKEND_INIT_EXPORT void InitCudaBackend () {
394- ET_LOG (
395- Info,
396- " CALLING INITCUDABACKEND" );
397394#ifdef _WIN32
398395 // On Windows, explicitly register the backend since DLL static initializers
399396 // don't run reliably
400397 static bool initialized = false ;
401398 if (!initialized) {
402- register_backend (backend);
399+ ET_LOG (Info, " Registering CUDA backend on Windows" );
400+ auto error = register_backend (backend);
401+ if (error == executorch::runtime::Error::Ok) {
402+ ET_LOG (Info, " Successfully registered CudaBackend" );
403+ } else {
404+ ET_LOG (Error, " Failed to register CudaBackend: error code %d" , (int )error);
405+ }
403406 initialized = true ;
407+ } else {
408+ ET_LOG (Info, " CUDA backend already initialized" );
404409 }
405410#else
406411 // On other platforms, static initialization already happened
412+ ET_LOG (Info, " CUDA backend using static initialization" );
407413 (void )success_with_compiler;
408414#endif
409415}
You can’t perform that action at this time.
0 commit comments