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

Use os.add_dll_directory on Windows #918

Merged
merged 1 commit into from
Sep 27, 2022

Conversation

oleksandr-pavlyk
Copy link
Collaborator

@oleksandr-pavlyk oleksandr-pavlyk commented Sep 27, 2022

This makes DPCTLSyclInterface.dll library findable with Python 3.10

Python 3.10 modifies the behavior on how it looks for DLLs to make it more secure. Library provides must add it to DLL search path using 'add_dll_directory' utility for Python's internal dynamic library opener to be able to find it.

This affects loading of native extensions as well, since if native extension depends on the DLL which can not be found by Python's library loader, ModuleNotFoundError is raised

  • Have you provided a meaningful PR description?
  • Have you added a test, reproducer or referred to an issue with a reproducer?
  • Have you tested your changes locally for CPU and GPU devices?
  • Have you made sure that new changes do not introduce compiler warnings?
  • If this PR is a work in progress, are you filing the PR as a draft?

This makes DPCTLSyclInterface.dll library findable with Python 3.10

Python 3.10 modifies the behavior on how it looks for DLLs to make it
more secure. Library provides must add it to DLL search path using
'add_dll_directory' utility for Python's internal dynamic library opener
to be able to find it.

This affects loading of native extensions as well, since if native extension
depends on the DLL which can not be found by Python's library loader,
ModuleNotFoundError is raised
@github-actions
Copy link

@coveralls
Copy link
Collaborator

Coverage Status

Coverage decreased (-0.01%) to 82.039% when pulling f87458e on win-use-add-dll-directory into ecec512 on master.

@github-actions
Copy link

Array API standard conformance tests failed to run for dpctl=0.14.0dev0=py310h8c27c75_124.

@oleksandr-pavlyk oleksandr-pavlyk merged commit ae5b934 into master Sep 27, 2022
@oleksandr-pavlyk oleksandr-pavlyk deleted the win-use-add-dll-directory branch September 27, 2022 21:25
@github-actions
Copy link

Deleted rendered PR docs from intelpython.github.com/dpctl, latest should be updated shortly. 🤞

@github-actions
Copy link

Array API standard conformance tests failed to run for dpctl=0.14.0dev0=py310h8c27c75_124.

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.

3 participants