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

Add a target inside the experimental module #1213

Merged
merged 3 commits into from
Nov 13, 2023

Conversation

diptorupd
Copy link
Contributor

@diptorupd diptorupd commented Nov 11, 2023

  • Have you provided a meaningful PR description?
    Changes introduced in the experimental module should not have side effects on the numba_dpex.core components. For this reason, an experimental target is being introduced into numba_dpex.experimental. Any future typing or lowering changes for any experimental feature should be introduced here.

  • Have you added a test, reproducer or referred to an issue with a reproducer?

  • Have you tested your changes locally for CPU and GPU devices?

  • Have you made sure that new changes do not introduce compiler warnings?

  • If this PR is a work in progress, are you filing the PR as a draft?

from numba_dpex.core.exceptions import (
ExecutionQueueInferenceError,
UnsupportedKernelArgumentError,
)
from numba_dpex.core.pipelines import kernel_compiler
from numba_dpex.core.types import DpnpNdArray

from .target import dpex_exp_kernel_target
Copy link
Contributor

Choose a reason for hiding this comment

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

do we want to avoid relative imports?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can, but in the past I have found relative imports to be the only way out of avoiding circular imports.

Copy link
Contributor

Choose a reason for hiding this comment

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

It is okay for now then. We just need to rethink design to avoid circular imports

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I agree 👍

@@ -177,7 +179,7 @@ class KernelDispatcher(Dispatcher):

"""

targetdescr = dpex_kernel_target
targetdescr = dpex_exp_kernel_target
Copy link
Contributor

Choose a reason for hiding this comment

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

I can't see usage of targetdescr

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Copy link
Contributor

@ZzEeKkAa ZzEeKkAa Nov 13, 2023

Choose a reason for hiding this comment

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

Sorry, my fault. It was confused, because it is defined on class level. I was expecting to see it in init with self.*.

Copy link
Contributor

@ZzEeKkAa ZzEeKkAa left a comment

Choose a reason for hiding this comment

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

LGTM!

@diptorupd diptorupd merged commit 6f670d6 into main Nov 13, 2023
23 checks passed
@diptorupd diptorupd deleted the feature/experimental_target branch November 13, 2023 17:30
github-actions bot added a commit that referenced this pull request Nov 13, 2023
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.

2 participants