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

Feature/remove unused kernel model fields #1293

Merged
merged 6 commits into from
Jan 23, 2024

Conversation

ZzEeKkAa
Copy link
Contributor

@ZzEeKkAa ZzEeKkAa commented Jan 23, 2024

As was mentioned in #929 we don't need host specific fields in kernel. Another issue that we addressing here, since #1263 not all fields on device have addrspace, which results in broken opencl:gpu test cases. This PR is all about removing parent, meminfo and sycl_queue from device representation of usm arrays.

What was done:

  • Use proper datamodel in few places
  • Remove parent, meminfo and sycl_queue fields from the data model used by the USMNdArray type in kernels
  • Introduce kernel specific allocation of array for local/private memories and views
  • Organize datamodel specific tests

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?

Closes: #929

@ZzEeKkAa ZzEeKkAa requested a review from diptorupd January 23, 2024 13:26
@ZzEeKkAa ZzEeKkAa self-assigned this Jan 23, 2024
@ZzEeKkAa ZzEeKkAa force-pushed the feature/remove_unused_krenel_model_fields branch 6 times, most recently from fedbc1b to decad99 Compare January 23, 2024 16:34
@diptorupd diptorupd changed the title WIP: Feature/remove unused krenel model fields WIP: Feature/remove unused kernel model fields Jan 23, 2024
@ZzEeKkAa ZzEeKkAa force-pushed the feature/remove_unused_krenel_model_fields branch from decad99 to bba3096 Compare January 23, 2024 16:53
@ZzEeKkAa ZzEeKkAa changed the base branch from main to use_dpcpp_2024.1 January 23, 2024 16:53
@ZzEeKkAa ZzEeKkAa changed the title WIP: Feature/remove unused kernel model fields Feature/remove unused kernel model fields Jan 23, 2024
@ZzEeKkAa ZzEeKkAa marked this pull request as ready for review January 23, 2024 16:53
Copy link
Contributor

Documentation preview: show.

Base automatically changed from use_dpcpp_2024.1 to main January 23, 2024 17:00
@ZzEeKkAa ZzEeKkAa force-pushed the feature/remove_unused_krenel_model_fields branch from bba3096 to 186170d Compare January 23, 2024 17:00
@ZzEeKkAa ZzEeKkAa force-pushed the feature/remove_unused_krenel_model_fields branch from 7aac67c to e298fb3 Compare January 23, 2024 18:07
Copy link
Contributor

@diptorupd diptorupd left a comment

Choose a reason for hiding this comment

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

Few minor things, but overall good to go. Thank you!

numba_dpex/core/datamodel/models.py Show resolved Hide resolved
numba_dpex/core/utils/kernel_launcher.py Outdated Show resolved Hide resolved
numba_dpex/core/utils/kernel_launcher.py Outdated Show resolved Hide resolved
array_attr_pos=array_data_model.get_field_position("nitems"),
array_attr_ty=array_data_model.get_member_fe_type("nitems"),
array_val=host_array_val,
array_attr_pos=host_array_data_model.get_field_position("nitems"),
Copy link
Contributor

Choose a reason for hiding this comment

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

A comment is needed here as to when host_array_data_model is used and when kernel_Array_data_model is used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It needs proper refactoring. Did my best to give reader some clue

numba_dpex/dpnp_iface/arrayobj.py Outdated Show resolved Hide resolved
numba_dpex/dpnp_iface/arrayobj.py Show resolved Hide resolved
@ZzEeKkAa ZzEeKkAa force-pushed the feature/remove_unused_krenel_model_fields branch from e298fb3 to 72f66dd Compare January 23, 2024 20:23
@ZzEeKkAa ZzEeKkAa enabled auto-merge January 23, 2024 20:26
@ZzEeKkAa ZzEeKkAa requested a review from diptorupd January 23, 2024 20:26
@ZzEeKkAa ZzEeKkAa merged commit 92a7a7d into main Jan 23, 2024
36 of 46 checks passed
@ZzEeKkAa ZzEeKkAa deleted the feature/remove_unused_krenel_model_fields branch January 23, 2024 21:04
github-actions bot added a commit that referenced this pull request Jan 23, 2024
…l_model_fields

Feature/remove unused kernel model fields 92a7a7d
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.

Evaluate the need to pass meminfo and parent attributes of an array as kernel params
2 participants