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

[Bug] Legalization for nn.dense on cuda does not account for change of units #8505

Closed
lazycal opened this issue Jul 19, 2021 · 1 comment
Closed

Comments

@lazycal
Copy link
Contributor

lazycal commented Jul 19, 2021

Minimum code to reproduce:

import tvm
from tvm import relay

x = relay.var('x', shape=(32, 128), dtype='float16')
y = relay.var('y', shape=(20, 128), dtype='float16')
x1 = relay.nn.dense(x, y, units=20)
func = relay.Function([x,y], x1)
mod = tvm.IRModule.from_expr(func)

with tvm.transform.PassContext(opt_level=3):
    with tvm.target.Target('cuda'):
        lib = relay.optimize(mod)

A quick fix would be adding one line of code new_attrs['units'] = None before here (but that may not be desired since it makes a originally non-None units None).

@lazycal
Copy link
Contributor Author

lazycal commented Sep 17, 2021

Closed as it's already fixed in this PR: #9030

@lazycal lazycal closed this as completed Sep 17, 2021
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

No branches or pull requests

1 participant