Skip to content

Fix, test set_arg with None argument#898

Merged
inducer merged 1 commit intomainfrom
fix-set_arg-none
Feb 26, 2026
Merged

Fix, test set_arg with None argument#898
inducer merged 1 commit intomainfrom
fix-set_arg-none

Conversation

@inducer
Copy link
Owner

@inducer inducer commented Feb 26, 2026

Closes gh-897

Copilot AI review requested due to automatic review settings February 26, 2026 15:23
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug where calling set_arg with a None argument would fail due to missing Python binding configuration. The fix enables the Python binding to accept None values, which the C++ implementation already handles correctly by setting a null kernel argument.

Changes:

  • Added .none(true) flag to the set_arg method's arg parameter in the Python binding
  • Added a regression test to verify set_arg accepts None without raising an exception

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
src/wrap_cl_part_2.cpp Modified set_arg binding to allow None values by adding .none(true) to the arg parameter
test/test_wrapper.py Added regression test test_set_arg_none to verify set_arg accepts None argument

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@inducer inducer merged commit 92fa22d into main Feb 26, 2026
23 checks passed
@inducer inducer deleted the fix-set_arg-none branch February 26, 2026 15:40
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.

Kernel set_arg does not accept None

2 participants