Skip to content

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
@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 <[email protected]>
@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
whitneywhtsang pushed a commit that referenced this pull request Feb 18, 2025
The same motivation as for
#3251 and
#3230

---------

Signed-off-by: Anatoly Myachev <[email protected]>
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

3 participants