Skip to content
This repository was archived by the owner on Jul 13, 2026. It is now read-only.

Add kernel item and nd_item support - #1301

Merged
ZzEeKkAa merged 2 commits into
mainfrom
feature/kernel_item
Feb 2, 2024
Merged

ZzEeKkAa merged 2 commits into
mainfrom
feature/kernel_item

Conversation

@ZzEeKkAa

@ZzEeKkAa ZzEeKkAa commented Feb 1, 2024 •

Copy link
Copy Markdown
Contributor

Add mocks for sycl's item and nd_item in python and add optional support for them as a first argument to experimental kernel. Changes does not introduce any changes to spriv kernel signature and works only at typing level.
So far there were provided two overloads:

  • Item.get_id(idx)
  • NdItem.get_global_id(idx)

Things that need to be done in following PRs:

  • Add overloads for get_local_id(idx)
  • Add Group type and overloads related to it
  • Update Barrier syntax.
  • Deprecate current way of getting indexes.

Checklist:

  • Have you provided a meaningful PR description?
  • 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?

Fixes #274

Motivated by #1106

@ZzEeKkAa ZzEeKkAa self-assigned this Feb 1, 2024
@ZzEeKkAa
ZzEeKkAa force-pushed the feature/kernel_item branch 10 times, most recently from fb5b213 to 4a23fe8 Compare February 2, 2024 17:03
Comment thread numba_dpex/experimental/__init__.py Outdated
Comment thread numba_dpex/experimental/_kernel_dpcpp_spirv_overloads/_item_overloads.py Outdated
Comment thread numba_dpex/experimental/core/types/kernel_api/items.py Outdated
Comment thread numba_dpex/experimental/core/types/kernel_api/items.py Outdated
Comment thread numba_dpex/experimental/kernel_dispatcher.py
Comment thread numba_dpex/experimental/launcher.py Outdated
Comment thread numba_dpex/experimental/launcher.py Outdated
Comment thread numba_dpex/kernel_api/__init__.py Outdated
Comment thread numba_dpex/kernel_api/items.py
@ZzEeKkAa
ZzEeKkAa force-pushed the feature/kernel_item branch 2 times, most recently from 42dc605 to 793647c Compare February 2, 2024 17:53
@ZzEeKkAa
ZzEeKkAa marked this pull request as ready for review February 2, 2024 17:53
@ZzEeKkAa
ZzEeKkAa force-pushed the feature/kernel_item branch from 793647c to f3ce9a9 Compare February 2, 2024 17:55
@ZzEeKkAa
ZzEeKkAa requested a review from diptorupd February 2, 2024 17:56
@ZzEeKkAa ZzEeKkAa changed the title WIP: Add kernel item and nd_item support Add kernel item and nd_item support Feb 2, 2024

@diptorupd diptorupd left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Great work! Yet another 3 year old feature request can be marked as complete 😄

@ZzEeKkAa
ZzEeKkAa force-pushed the feature/kernel_item branch 2 times, most recently from 87d4712 to dac598d Compare February 2, 2024 19:27
@ZzEeKkAa
ZzEeKkAa force-pushed the feature/kernel_item branch from dac598d to b3ae9c2 Compare February 2, 2024 20:08
@ZzEeKkAa
ZzEeKkAa enabled auto-merge February 2, 2024 20:11
@ZzEeKkAa
ZzEeKkAa merged commit f1e0eff into main Feb 2, 2024
@ZzEeKkAa
ZzEeKkAa deleted the feature/kernel_item branch February 2, 2024 20:53
github-actions Bot added a commit that referenced this pull request Feb 2, 2024
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.

Support SYCL indexing function

2 participants