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

fix windows 3.8 dll loading for cuda #5259

Merged
merged 4 commits into from Feb 5, 2023
Merged

fix windows 3.8 dll loading for cuda #5259

merged 4 commits into from Feb 5, 2023

Conversation

yxlao
Copy link
Contributor

@yxlao yxlao commented Jun 28, 2022

  • CUDA pybind fails to load for Python 3.8. Somehow it worked for 3.9. This PR fixes that.
  • Windows CI does not trigger this error so it was hidden from us.
  • Changed from warnings to logging package, as the warnings package does not print on Windows by default.

This change is Reviewable

@update-docs
Copy link

update-docs bot commented Jun 28, 2022

Thanks for submitting this pull request! The maintainers of this repository would appreciate if you could update the CHANGELOG.md based on your changes.

@yxlao yxlao marked this pull request as ready for review June 28, 2022 16:52
@yxlao yxlao requested a review from ssheorey June 28, 2022 16:52
Copy link
Contributor

@ssheorey ssheorey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The warnings are actually not shown by default on any platform, since the CUDA devices not found or CUDA libraries not found warning will always show up when loading CUDA Open3D package on a CPU only machine.

http://www.open3d.org/docs/latest/getting_started.in.html?highlight=warnings#troubleshooting

They should show up only with python -Wdefault "import open3d". If this is not the desired behavior, we can enable them all the time with warning filter settings.

https://docs.python.org/3/library/warnings.html#default-warning-filter
warnings.filterwarnings('default', message='.*', category=ImportWarning,module='open3d')
(or more fine grained control is possible with lineno)

python/open3d/__init__.py Show resolved Hide resolved
@ssheorey ssheorey added the TBD label Jan 20, 2023
@ssheorey ssheorey self-requested a review January 27, 2023 16:17
@ssheorey ssheorey added this to the v0.17 milestone Jan 27, 2023
@ssheorey ssheorey removed the TBD label Jan 27, 2023
@ssheorey
Copy link
Contributor

Main change: Add winmode=0 for CDLL function

Copy link
Contributor

@ssheorey ssheorey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on Win 10 with Python 3.8.

@ssheorey ssheorey merged commit 61fa815 into master Feb 5, 2023
38 of 39 checks passed
@ssheorey ssheorey deleted the yixing/win-cuda-fix branch February 5, 2023 06:33
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

Successfully merging this pull request may close these issues.

None yet

2 participants