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

Implement arch_parser.c as pure dll #3230

Merged
merged 2 commits into from
Jan 23, 2025
Merged

Conversation

anmyachev
Copy link
Contributor

@anmyachev anmyachev commented Jan 22, 2025

This should avoid issues like: ImportError: DLL load failed while importing arch_utils: The parameter is incorrect. on windows. One could see this issue here: https://github.com/intel/intel-xpu-backend-for-triton/actions/runs/12901598261/job/35973923326.

As a result, this may solve the following problem (if we make such a change for all modules): #3090

After this PR this issue still exists, for example for __triton_launcher:
image

CI:

Ref: python/cpython#114538

@anmyachev anmyachev force-pushed the amyachev/arch-parser-pure-dll branch from 489671d to 3b7e649 Compare January 22, 2025 22:05
Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
@anmyachev anmyachev force-pushed the amyachev/arch-parser-pure-dll branch from 3b7e649 to fa6c686 Compare January 22, 2025 22:30
self.shared_library.dlclose(handle)
else:

def __del__(self):
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Using a pure dll, it is possible to unload the library from the process memory, which is important for Windows (considering the tests that fail). I also rewrote this module for Linux, since using Python for it seems overcomplicated.

Signed-off-by: Anatoly Myachev <anatoly.myachev@intel.com>
@anmyachev anmyachev marked this pull request as ready for review January 22, 2025 23:48
@anmyachev anmyachev merged commit d7d55b8 into main Jan 23, 2025
7 checks passed
@anmyachev anmyachev deleted the amyachev/arch-parser-pure-dll branch January 23, 2025 11:31
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.

ImportError: DLL load failed while importing arch_utils: The parameter is incorrect
2 participants