Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Import Time Increase from Kaolin 0.16 Due to Warp Initialization #851

Open
Kurokabe opened this issue Jan 2, 2025 · 0 comments
Open

Import Time Increase from Kaolin 0.16 Due to Warp Initialization #851

Kurokabe opened this issue Jan 2, 2025 · 0 comments

Comments

@Kurokabe
Copy link

Kurokabe commented Jan 2, 2025

Description:
Starting with Kaolin 0.16, importing Kaolin functions unrelated to the physics module triggers Warp initialization, resulting in increased import time.

Steps to Reproduce:

  1. Install Kaolin 0.16.
  2. Import any Kaolin module unrelated to the physics functionality.
  3. Observe the increased import time compared to previous versions.

Cause:
The root cause lies in the kaolin/__init__.py file, where from . import physics is invoked. This cascades into:

  • from . import simplicits
  • from .losses_warp import *

The final step initializes Warp:

Expected Behavior:
Kaolin modules unrelated to physics should not trigger Warp initialization, allowing for faster import times.

Proposed Solution:
Defer Warp initialization until it is explicitly needed, such as during the first call to a physics function. This ensures that importing Kaolin functions unrelated to Warp remains efficient, as was the case in versions prior to 0.16.

Additional Notes:
This change will improve the usability of Kaolin for non-physics applications, maintaining consistency with the behavior of earlier versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant