Skip to content

Conversation

@isVoid
Copy link
Contributor

@isVoid isVoid commented Feb 6, 2026

PR #717 makes calling convention a configurable object in target context. In that PR, we attempt to initialize calling convention inside CUDAFlag. However, just CUDAFlag is also a global config object for codegen, which goes in contradiction to our intention that calling convention should be per-function based. In this PR, we moved the initialization of calling conventions to compile_cuda, which is meant to be the compile entry point of a cuda function.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 6, 2026

Automatic reviews are disabled for this repository.

@copy-pr-bot
Copy link

copy-pr-bot bot commented Feb 6, 2026

Auto-sync is disabled for ready for review pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@isVoid
Copy link
Contributor Author

isVoid commented Feb 7, 2026

/ok to test

Copy link
Contributor

@gmarkall gmarkall left a comment

Choose a reason for hiding this comment

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

This fixes the issue in compile_subroutine(), but I want to try and hold off merging it without a proper fix, as it turns a loud failure into a silent miscompilation.

@isVoid isVoid changed the title Check Status in BaseContext.call_internal Initialize calling convention and abi info in compile_cuda, not CUDAFlag Feb 9, 2026
# is compiled with numba-abi. So cres should have CUDACallConv.
assert isinstance(cres.fndesc.call_conv, CUDACallConv)

_, result = context.call_internal_no_propagate(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Because wrapper function is CABI function, lower level calls are unable to propagate to top level. Hence using call_internal_no_propagate.

@isVoid isVoid requested a review from gmarkall February 12, 2026 17:09
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