Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed incorrect PTX parsing of ret instruction after branch label #17859

Merged
merged 4 commits into from
Feb 4, 2025

Conversation

lamarrr
Copy link
Contributor

@lamarrr lamarrr commented Jan 29, 2025

Description

The PTX parser replaces PTX code with inline PTX code (using inline ASM blocks).
It considers a branch label and the immediate instruction as a single unit to process.
During the ASM->CUDA transform step, it searches for the ret instruction in the string and replaces the whole statement and not the substring that contains the ret; instruction. which means an expression like:

BB0_1:
ret;

is parsed as:

BB0_1: ret;

and then transformed to:

bra RETTGT

instead of:

BB0_1: bra RETTGT

This merge request fixes this bug.

Checklist

  • I am familiar with the Contributing Guidelines.
  • New or existing tests cover these changes.
  • The documentation is up to date with these changes.

@lamarrr lamarrr added bug Something isn't working breaking Breaking change labels Jan 29, 2025
@lamarrr lamarrr requested a review from a team as a code owner January 29, 2025 17:44
@github-actions github-actions bot added the libcudf Affects libcudf (C++/CUDA) code. label Jan 29, 2025
@lamarrr lamarrr changed the base branch from branch-25.02 to branch-25.04 January 31, 2025 13:42
@lamarrr
Copy link
Contributor Author

lamarrr commented Feb 4, 2025

thanks for the quick turnaround!

@lamarrr
Copy link
Contributor Author

lamarrr commented Feb 4, 2025

/merge

@rapids-bot rapids-bot bot merged commit 0e91baf into rapidsai:branch-25.04 Feb 4, 2025
107 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
breaking Breaking change bug Something isn't working libcudf Affects libcudf (C++/CUDA) code.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants