Skip to content

Conversation

@lbushi25
Copy link
Contributor

@lbushi25 lbushi25 commented Dec 5, 2025

Add support for structs containing special types as free function kernel parameters.

// CHECK-NEXT: { kernel_param_kind_t::kind_pointer, 8, 0 },
// CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 4, 8 },
// CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 4, 12 },
// CHECK-NEXT: { kernel_param_kind_t::kind_std_layout, 4, 0 },
Copy link
Contributor Author

@lbushi25 lbushi25 Dec 5, 2025

Choose a reason for hiding this comment

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

@premanandrao Regarding these changes...

The offsets for arguments of a free function kernel are somewhat meaningless since there is no concept of a closure class as is the case with lambda kernels. Therefore, I think it's less confusing to simply give them an offset of zero and reserve non-zero offsets for the fields inside a parameter struct which will help us find them in the runtime layer. So, all of these zeros are simply offsets of top-level parameters for which a non-zero offset does not make sense in the context of free function kernels.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@premanandrao Also, your other suggestions in #18692 have been applied including the unused function.

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.

2 participants