FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[SYCLomatic-test] Block store test by abhilash1910 · Pull Request #725 · oneapi-src/SYCLomatic-test · GitHub

This repository was archived by the owner on Jul 21, 2026. It is now read-only.
/ SYCLomatic-test Public archive

[SYCLomatic-test] Block store test - #725

Open
abhilash1910 wants to merge 15 commits into
oneapi-src:SYCLomaticfrom
abhilash1910:block_store_test_
Open

[SYCLomatic-test] Block store test #725
abhilash1910 wants to merge 15 commits into
oneapi-src:SYCLomaticfrom
abhilash1910:block_store_test_

Conversation

abhilash1910 commented Jun 5, 2024
edited
Loading

Copy link
Copy Markdown
Contributor

In line with block store PR (oneapi-src/SYCLomatic#1819), this tests only store api.
WIP. Linked to composite PR : #680

cc @danhoeflinger @mmichel11 @yihanwg

abhilash1910 requested a review from a team as a code owner June 5, 2024 09:55
abhilash1910 marked this pull request as draft June 5, 2024 09:55
abhilash1910 marked this pull request as ready for review June 6, 2024 04:19
Co-authored-by: Dan Hoeflinger <109972525+danhoeflinger@users.noreply.github.com>
thread_data[i] = dacc_read[global_index * 4 + i];
}

auto *d_r =

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Could you clarify why we are storing to buffer here and then storing the thread_data to buffer_out? To me, it looks like we are not verifying the group_store operation since buffer_out is being passed to the verification routine which is just the value of thread_data .

item.get_local_id(2); // Each thread_data has 4 elements
#pragma unroll
for (int i = 0; i < 4; ++i) {
dacc_write[global_index * 4 + i] = thread_data[i];

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Similar question to above about the purpose of this and how we are verifying the store routines at all.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Since the recent changes, we are now doing group_store(tmp).store(item, d_w, thread_data); where d_w is referring to buffer_out. This part seems correct, but my comment about these lines still apply.

It seems like the contents of buffer_out after the group_store operation are being overwritten by the writes in this loop. Can we just remove this entire loop? I am not sure why it is here unless I misunderstand.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Yes modified to prevent the overwrite, could you please take a look . Thanks

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Thanks, this looks to resolve the issue

abhilash1910 marked this pull request as draft August 2, 2024 13:14
abhilash1910 marked this pull request as ready for review August 2, 2024 13:24
Comment on lines +48 to +58
int expected[512];
int num_threads = 128;
int items_per_thread = 4;
uint32_t sg_sz_val = *sg_sz;
for (int i = 0; i < num_threads; ++i) {
for (int j = 0; j < items_per_thread; ++j) {
expected[items_per_thread * i + j] =
(i / sg_sz_val) * sg_sz_val * items_per_thread + sg_sz_val * j +
i % sg_sz_val;
}
}

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It looks like we are setting up expected and then never using it. Am I missing something?

}

for (int i = 0; i < 512; ++i) {
if (ptr[i] != i) {

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

It looks like the actual check is just against the index i.
That also seems to be the source data for the input buffer, does this pass?

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I believe the test is passing since we are overwriting the results of the subgroup store operation in test_store_subgroup_striped_standalone

sg_sz_acc[0] = item.get_sub_group().get_local_linear_range();
}
dpct::group::store_subgroup_striped<4, int>(item, d_w, thread_data);
// reapply global mapping

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

We are overwriting the result of the sub-group store here from lines 173 to 179. If we remove this the test fails.

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Interesting... seems like this should not be here.

abhilash1910 and others added 3 commits August 22, 2024 15:02
Co-authored-by: Dan Hoeflinger <109972525+danhoeflinger@users.noreply.github.com>
Co-authored-by: Dan Hoeflinger <109972525+danhoeflinger@users.noreply.github.com>
Co-authored-by: Dan Hoeflinger <109972525+danhoeflinger@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
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.

3 participants


Back | FazBrowse Home | New Git URL