Intel® oneAPI Threading Building Blocks
Ask questions and share information about adding parallelism to your applications when using this threading library.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.

tbb malloc proxy with Python3

Sayed__Ahmed
Beginner
313 Views

We are implementing an SDK with both C++ and Python interface.

For performance reasons we had to link them with tbb_malloc_proxy.lib

For the C++ interface the performance increased by 5x.

while for the Python interface it didn't make any difference byt further investigation with Intel Amplifier we found that the python still uses the ntdll.dll not the tbb_malloc_proxy.dll.

I did build the python interpreter against tbb_malloc_proxy.lib and now it works as fast as the C++ interface.

My question:

Can I inject the tbb_malloc_proxy.dll with the standard python on windows 10 ?

I tried the appinit_dlls but it didn't work for me but may be I did something wrong

1. I did copy the tbb dlls to the system32,

2. I changed the registery key

HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Windows\AppInit_DLLs with the names of the dlls (space separated)

3. I did change the registery key HKEY_LOCAL_MACHINE\Software\Microsoft\Windows NT\CurrentVersion\Windows\LoadAppInit_DLLs to 1

Any other suggestoins will be appreciated

Thanks

0 Kudos
1 Reply
Nikita_P_Intel
Employee
313 Views

Hi! Unfortunately, we do not support such DLL injection model (without explicit linkage) and have no instructions or suggestions to follow.

Reply