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

reporting name collisions from rewriter #2079

Open
leshabirukov opened this issue Feb 27, 2025 · 1 comment
Open

reporting name collisions from rewriter #2079

leshabirukov opened this issue Feb 27, 2025 · 1 comment
Assignees

Comments

@leshabirukov
Copy link
Contributor

leshabirukov commented Feb 27, 2025

I have an issue with rewriter, while creating an output value like this:

def ons_init(op, np_array, inzer_name ):  
    assert init_name_is_uniq(op, inzer_name), f'ons_init: name "{inzer_name}" is already used!'
    inzer_help = numpy_helper.from_array(np_array)  
    inzer_irir = TensorProtoTensor(inzer_help)  
    inzer = op.initializer(inzer_irir, inzer_name)  
    return inzer  

maker_3.py.txt

this code is used by 'replacement', cause name collisions. assert init_name_is_uniq not helps, because some substitutions work in parallel, (they see same source graph, accept same inzer_name ) then rewriter do substitutions, resulting one of initializers reused, others killed. It would be great, if rewriter at least reports the error.

A suppose it is rather a bug, considering latter:
#1536

@justinchuby
Copy link
Collaborator

cc @gramalingam

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

No branches or pull requests

3 participants