Skip to content

Fix incomplete object size (=4n + 3) support of amd_wave_read_first_lane()#738

Merged
zjing14 merged 16 commits into
developfrom
feature/fix-imcomplete-support-of-amd-wave-read-first-lane
Jun 12, 2023
Merged

Fix incomplete object size (=4n + 3) support of amd_wave_read_first_lane()#738
zjing14 merged 16 commits into
developfrom
feature/fix-imcomplete-support-of-amd-wave-read-first-lane

Conversation

@poyenc
Copy link
Copy Markdown
Contributor

@poyenc poyenc commented Jun 1, 2023

This is a complement to PR 711

Though it's unlikely to use (4n + 3) byte class types in real-world scenarios. I think it's still necessary to fix missing size support of ck::amd_wave_read_first_lane().

We can create such type by declaring a struct S which has only single byte-array data member:

struct S {
   unsigned char uca[3];
};
static_assert(sizeof(S) == 3);

const auto s = ck::amd_wave_read_first_lane(S{1, 2, 3}); // compilation error before this PR
assert(s.uca[0] == 1);
assert(s.uca[1] == 2);
assert(s.uca[2] == 3);

@poyenc poyenc requested a review from qianfengz June 1, 2023 15:22
@poyenc poyenc self-assigned this Jun 1, 2023
@poyenc poyenc added the WIP label Jun 1, 2023
@poyenc poyenc removed the WIP label Jun 1, 2023
@poyenc poyenc changed the title Fix incomplete object size (=4n + 3) support of amd_wave_read_first_lane() Fix incomplete object size (=4n+3) support of amd_wave_read_first_lane() Jun 1, 2023
@poyenc poyenc changed the title Fix incomplete object size (=4n+3) support of amd_wave_read_first_lane() Fix incomplete object size (=4n + 3) support of amd_wave_read_first_lane() Jun 2, 2023
qianfengz
qianfengz previously approved these changes Jun 6, 2023
@qianfengz qianfengz requested a review from zjing14 June 6, 2023 15:09
poyenc added 2 commits June 7, 2023 23:57
…ane' of github.com:ROCmSoftwarePlatform/composable_kernel into feature/fix-imcomplete-support-of-amd-wave-read-first-lane
@poyenc
Copy link
Copy Markdown
Contributor Author

poyenc commented Jun 7, 2023

Fixed the compilation error (using __device__ function from host method)

@zjing14 zjing14 merged commit 7c24654 into develop Jun 12, 2023
@illsilin illsilin deleted the feature/fix-imcomplete-support-of-amd-wave-read-first-lane branch December 7, 2023 18:57
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