Skip to content

TEST: atomic_* functions#410

Merged
kennykos merged 4 commits intomainfrom
kennykos/atomics
Apr 27, 2026
Merged

TEST: atomic_* functions#410
kennykos merged 4 commits intomainfrom
kennykos/atomics

Conversation

@kennykos
Copy link
Copy Markdown
Collaborator

Previously, only atomic_fetch_* functions where tested. Now we test atomic_* as well.

@kennykos
Copy link
Copy Markdown
Collaborator Author

@Wilson1211 can you confirm that this change works for you're workunits? If not, please share a workunit that breaks and I will add this to the test suite.

@Wilson1211
Copy link
Copy Markdown
Collaborator

Wilson1211 commented Apr 17, 2026

@kennykos
This will affect atomic_compare_exchange

Error in /shared/graphyk/pk-llp/src/bc_teampolicy.py:109: atomic_op functions take exactly 3 arguments
DEBUG AST:
Call(
func=Attribute(
value=Name(id='pk', ctx=Load()),
attr='atomic_compare_exchange',
ctx=Load()),
args=[
Name(id='labels', ctx=Load()),
List(
elts=[
Name(id='neighborIdx', ctx=Load())],
ctx=Load()),
UnaryOp(
op=USub(),
operand=Constant(value=1)),
Name(id='new_label', ctx=Load())])
old_label : int = pk.atomic_compare_exchange(labels, [neighborIdx], -1, new_label)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Translation of <ast.FunctionDef object at 0x7af6e815dd50> forward failed

@kennykos
Copy link
Copy Markdown
Collaborator Author

atomic_compare_exchange

Great, I will add this to the test suite.

@kennykos
Copy link
Copy Markdown
Collaborator Author

kennykos commented Apr 17, 2026

@Wilson1211 I added a test for atomic_compare_exchange, let me know if everything works now.

@Wilson1211
Copy link
Copy Markdown
Collaborator

@kennykos
All good! Works now.

@kennykos kennykos requested a review from JBludau April 27, 2026 17:04
Copy link
Copy Markdown
Contributor

@JBludau JBludau left a comment

Choose a reason for hiding this comment

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

looks good

@kennykos kennykos merged commit 3c780a2 into main Apr 27, 2026
17 checks passed
@kennykos kennykos deleted the kennykos/atomics branch April 27, 2026 20:36
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.

4 participants