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

Change all Numba-dppy examples to work wih dpctl 0.7.0 #309

Merged
merged 6 commits into from
May 3, 2021

Conversation

diptorupd
Copy link
Contributor

@diptorupd diptorupd commented Apr 4, 2021

Update all examples to use the latest dpctl 0.7.0 API pushed to main in #340.
Other improvements to examples.

@diptorupd diptorupd marked this pull request as draft April 4, 2021 03:02
@diptorupd diptorupd changed the title Upgrade to dpctl 0.7 [WIP] Upgrade to dpctl 0.7 Apr 4, 2021
@diptorupd
Copy link
Contributor Author

diptorupd commented Apr 4, 2021

There are few pending issues that need to be looked at:

  • examples/blackscholes_njit.py segfaults when used with level zero.

@diptorupd diptorupd force-pushed the Upgrade-to-dpctl-0.7 branch 3 times, most recently from d3f6c31 to dcda9e3 Compare April 21, 2021 23:27
  - All examples are updated to use dpctl 0.7 API
  - Add doc strings to examples
  - Rename pa_examples to auto_offload_examples
  - Remove sum-hybrid.py
  - Minor fixes and name changes.
@diptorupd diptorupd force-pushed the Upgrade-to-dpctl-0.7 branch from dcda9e3 to ce7c560 Compare April 27, 2021 20:09
@diptorupd diptorupd changed the title [WIP] Upgrade to dpctl 0.7 Chnage all Numba-dppy examples to work wih dpctl 0.7.0 Apr 27, 2021
@diptorupd diptorupd changed the title Chnage all Numba-dppy examples to work wih dpctl 0.7.0 Change all Numba-dppy examples to work wih dpctl 0.7.0 Apr 27, 2021
@diptorupd diptorupd marked this pull request as ready for review April 28, 2021 03:08
@diptorupd
Copy link
Contributor Author

diptorupd commented Apr 28, 2021

@reazulhoque I investigated the examples/blackscholes_njit.py segfault and it might be an issue that already existed and is just getting caught by the changes I made to the example. The issue seems to be that either we are reusing the cached program that was compiled for OpenCL on level zero or we are passing an OpenCL allocated USM pointer to level zero and it is crashing inside DPC++. I do not know if there is anything we can do inside dpctl to prevent the crash, we need to get to the root cause before that.

@reazulhoque
Copy link
Contributor

reazulhoque commented Apr 28, 2021

The issue in fact seems to be that we re relying on njit's caching mechanism which does not cascade down to the kernel level. So, we are reusing the njit function once we compile it even when the kernel that should be generated for the parfor regions are not the same.

@diptorupd
Copy link
Contributor Author

The issue in fact seems to be that we re relying on njit's caching mechanism which does not cascade down to the kernel level. So, we are reusing the njit function once we compile it even when the kernel that should be generated for the parfor regions are not the same.

As discussed, I have changed the failing example and opened an issue ticket #343 to track the caching issue.

@diptorupd diptorupd merged commit fb6f44a into main May 3, 2021
@diptorupd diptorupd deleted the Upgrade-to-dpctl-0.7 branch May 3, 2021 22:30
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