ROCm / MITuna

MIT License
7 stars 0 forks source link

Driver layout fix #937

Closed alexandraBara closed 9 months ago

alexandraBara commented 9 months ago

Fixes tensor layouts for convolution when not all 3 layouts are specified through the MIOpenDriver. Behavior is now this:

Appends all 3 layouts when composing a Driver obj from a db_row. Previously in_layout/fil_layout where omitted. When constructing a driver obj from an fdb_key we now check that all 3 layouts match.

To display the final driver cmd post constructor call do:

print(driver)
alexandraBara commented 9 months ago

LGTM double checking: This ensures that in parsing of the MIOpenDriver command will populate all three layouts correctly. Parsing for fdb-keys currently has correct behavior for layout parsing?

Both creating the ConvolutionDriver obj from fdb or Driver cmd would not populate all 3 layouts. However this behavior was only recently introduce since adding NHWC configs. I checked our DB and the only entries where tensor layouts and out_layout does not match is where one or more of those is a 3D layout, but all these entries have valid=0.