Skip to content

[STF] Fix equality operators for places#7494

Merged
andralex merged 18 commits intoNVIDIA:mainfrom
caugonnet:stf_fix_place_equality
Feb 5, 2026
Merged

[STF] Fix equality operators for places#7494
andralex merged 18 commits intoNVIDIA:mainfrom
caugonnet:stf_fix_place_equality

Conversation

@caugonnet
Copy link
Contributor

@caugonnet caugonnet commented Feb 4, 2026

Description

Equality operator is broken for exec places and data places which might share the same affine data place for example, as this is typically the case with green contexts. We fix that here.

closes

Checklist

  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@caugonnet caugonnet self-assigned this Feb 4, 2026
@caugonnet caugonnet added the stf Sequential Task Flow programming model label Feb 4, 2026
@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Feb 4, 2026

This pull request requires additional validation before any workflows can run on NVIDIA's runners.

Pull request vetters can view their responsibilities here.

Contributors can view more details about this message here.

@github-project-automation github-project-automation bot moved this to Todo in CCCL Feb 4, 2026
@cccl-authenticator-app cccl-authenticator-app bot moved this from Todo to In Progress in CCCL Feb 4, 2026
@caugonnet
Copy link
Contributor Author

The comparison looks broken too, it probably relies on the fact that we have static objects for most places (host, device, ...) but it will not be reliable for green contexts. We can have two identical green contexts (same view) but different objects.

// To use in a ::std::map indexed by exec_place
  bool operator<(const exec_place& rhs) const
  {
    return pimpl < rhs.pimpl;
  }

@caugonnet
Copy link
Contributor Author

/ok to test 4e6119d

@github-actions

This comment has been minimized.

@github-project-automation github-project-automation bot moved this from In Progress to In Review in CCCL Feb 4, 2026
@andralex
Copy link
Contributor

andralex commented Feb 4, 2026

lgtm

@andralex andralex marked this pull request as ready for review February 4, 2026 18:27
@andralex andralex requested a review from a team as a code owner February 4, 2026 18:27
@caugonnet
Copy link
Contributor Author

/ok to test 8bd9e01

@github-actions

This comment has been minimized.

@caugonnet
Copy link
Contributor Author

/ok to test 5e1ceea

@github-actions

This comment has been minimized.

@caugonnet
Copy link
Contributor Author

/ok to test 4ab6bdd

@github-actions

This comment has been minimized.

caugonnet and others added 2 commits February 5, 2026 00:12
… To keep

extensible types, we implement a type_uuid() virtual method that returns a
unique id for the type, making it possible to have an order on derived types.

Add various tests to make sure we can have maps and unordered maps of exec and
data places now.
@caugonnet
Copy link
Contributor Author

/ok to test b242c06

@caugonnet
Copy link
Contributor Author

/ok to test 53f84c1

@github-actions

This comment has been minimized.

@andralex
Copy link
Contributor

andralex commented Feb 5, 2026

/ok to test

@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Feb 5, 2026

/ok to test

@andralex, there was an error processing your request: E1

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/

@andralex andralex force-pushed the stf_fix_place_equality branch from 60cef48 to ca04f80 Compare February 5, 2026 05:50
@andralex
Copy link
Contributor

andralex commented Feb 5, 2026

/ok to test

@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Feb 5, 2026

/ok to test

@andralex, there was an error processing your request: E1

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/

@andralex andralex force-pushed the stf_fix_place_equality branch from ca04f80 to f7ba637 Compare February 5, 2026 06:09
@andralex andralex requested review from a team as code owners February 5, 2026 06:09
- Use typeid comparison consistently in both operator== and operator<
- Rename equals/less_than to operator==/operator< in data_place_extension
- Rename less_than to operator< in exec_place::impl

Co-authored-by: Cursor <cursoragent@cursor.com>
@andralex andralex force-pushed the stf_fix_place_equality branch from f7ba637 to d755dc0 Compare February 5, 2026 06:10
@andralex
Copy link
Contributor

andralex commented Feb 5, 2026

/ok to test

@copy-pr-bot
Copy link
Contributor

copy-pr-bot bot commented Feb 5, 2026

/ok to test

@andralex, there was an error processing your request: E1

See the following link for more information: https://docs.gha-runners.nvidia.com/cpr/e/1/

@caugonnet
Copy link
Contributor Author

/ok to test d755dc0

@github-actions

This comment has been minimized.

@caugonnet
Copy link
Contributor Author

/ok to test 0c9df2d

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2026

🥳 CI Workflow Results

🟩 Finished in 40m 20s: Pass: 100%/48 | Total: 15h 14m | Max: 29m 52s | Hits: 63%/23319

See results here.

@andralex andralex merged commit 7974065 into NVIDIA:main Feb 5, 2026
66 checks passed
@github-project-automation github-project-automation bot moved this from In Review to Done in CCCL Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stf Sequential Task Flow programming model

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants