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

Verify global_barrier, indexing, private array inside device_func #1391

Merged
merged 1 commit into from
Mar 19, 2024

Conversation

diptorupd
Copy link
Contributor

@diptorupd diptorupd commented Mar 19, 2024

  • Have you provided a meaningful PR description?

The existing func decorator has several design limitation that does not allow usage of features such as barrier, dpex.local.array and dpex.private.array inside a func decorated function. These limitations reduced the utility of the feature. See: https://github.com/soda-inria/sklearn-numba-dpex/blob/747914481371ee7fe6527240a7bb57104d207115/sklearn_numba_dpex/kmeans/kernels/lloyd_single_step.py#L142

All these limitations are addressed by the new experimental.device_func decorator. The PR adds unit tests to verify that kernel_api.global_barrier and kernel_api.PrivateArray can be used in a device_func decorated function.

  • 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?

@diptorupd diptorupd requested a review from ZzEeKkAa March 19, 2024 01:16
@diptorupd diptorupd force-pushed the device_func_unit_tests branch from 0496f86 to d89104d Compare March 19, 2024 01:17
@coveralls
Copy link
Collaborator

coveralls commented Mar 19, 2024

Coverage Status

coverage: 82.781%. remained the same
when pulling d89104d on device_func_unit_tests
into 97f9069 on main.

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! Thank you

@diptorupd diptorupd merged commit 202f460 into main Mar 19, 2024
63 of 65 checks passed
@diptorupd diptorupd deleted the device_func_unit_tests branch March 19, 2024 16:08
github-actions bot added a commit that referenced this pull request Mar 19, 2024
Verify global_barrier, indexing, private array inside device_func 202f460
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