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

Fix the metadata deduplication #1165

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

jiel-nv
Copy link

@jiel-nv jiel-nv commented Mar 3, 2025

The llvmlite debug metadata cache does not work as expected due to the encoding value using address of DIToken instance and serves as part of the key.

Solution is to extract the string value from the encoding object.

Since the DIToken class is designed to be a wrapper of enumeration value, e.g. the DW_* enumerations, that should appear bare in the emitted metadata, in this change, stringify DIToken is made to fix the problem.

This solves llvmlite issue #1164

jiel-nv added 4 commits March 3, 2025 09:30
The llvmlite debug metadata cache does not work as expected due to
the encoding value using address of DIToken instance and serves as
part of the key.

Solutions could be either singleton the DIToken class, or extract
the string value from the encoding object.

Since the DIToken class is designed to be a wrapper of enumeration
value, e.g. the DW_* enumerations, that should appear bare in the
emitted metadata, in this change, singleton DIToken is made to fix
the problem.

This solves llvmlit issue numba#1164
numba#1164
The llvmlite debug metadata cache does not work as expected due to
the encoding value using address of DIToken instance and serves as
part of the key.

Solution is to extract the string value from the encoding object.

Since the DIToken class is designed to be a wrapper of enumeration
value, e.g. the DW_* enumerations, that should appear bare in the
emitted metadata, in this change, stringify DIToken is made to fix
the problem.

This solved llvmlite issue numba#1164
@gmarkall
Copy link
Member

gmarkall commented Mar 4, 2025

Could you add a test please?

@jiel-nv
Copy link
Author

jiel-nv commented Mar 4, 2025

Could you add a test please?

Yes, done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants