Skip to content

Commit

Permalink
Change logging error to debugs and update messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jchen351 committed Dec 16, 2024
1 parent 5ddfc0f commit 287bd46
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions onnxruntime/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,13 +100,15 @@ def check_and_load_cuda_libs(root_directory, cuda_libs_):
_ = ctypes.CDLL(full_path)
logging.info(f"Successfully loaded: {full_path}")
except OSError as e:
logging.error(f"Failed to load {full_path}: {e}")
logging.debug(f"Failed to load {full_path}: {e}")

# If all required libraries are found, stop the search
if set(found_libs.keys()) == cuda_libs_:
logging.info("All required CUDA libraries found and loaded.")
return
logging.error(f"Failed to load all required CUDA libraries. missing libraries: {cuda_libs_ - found_libs.keys()}")
logging.debug(
f"Failed to load CUDA libraries from site-packages/nvidia directory: {cuda_libs_ - found_libs.keys()}. They might be loaded later from standard search paths for shared libraries."
)
return


Expand Down

0 comments on commit 287bd46

Please sign in to comment.