Skip to content
This repository was archived by the owner on Jan 25, 2023. It is now read-only.

Semantics "with dppl_context" #40

Draft
wants to merge 2 commits into
base: pydppl
Choose a base branch
from
Draft

Conversation

1e-to
Copy link

@1e-to 1e-to commented Sep 3, 2020

No description provided.

@@ -335,6 +336,8 @@ def dispatcher_factory(func_ir, objectmode=False, **kwargs):
myflags.force_pyobject = True
myflags.no_cpython_wrapper = False
cls = ObjModeLiftedWith
elif dppl_mode:
cls = DPPLLiftedWith

Choose a reason for hiding this comment

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

What is it actually doing?

Copy link
Author

Choose a reason for hiding this comment

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

This is necessary to create a dispatcher specifically for lifted code with new semantics. This is for now an intermediate solution, in the future it will be necessary to rewrite it so as not to change the numba files.

from numba.core.cpu_options import ParallelOptions


class _DPPLContextType(WithContext):
Copy link

@reazulhoque reazulhoque Sep 9, 2020

Choose a reason for hiding this comment

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

Can you please explain what this functions are doing?

Copy link
Author

Choose a reason for hiding this comment

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

This is a class that creates a separate dispatcher for the lifted code with our semantics. This is needed to run the code with the 'offload': True option and our pipeline

@1e-to 1e-to marked this pull request as draft September 11, 2020 09:28
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants