Skip to content

LayerNorm with bias=False or elementwise_affine=False fails to convert when using transformer-engine #20803

@cyanic-selkie

Description

@cyanic-selkie

Bug description

During the conversion, a check must be made that bias and weight are not None.

Here is the error for bias=False:

File "/usr/local/lib/python3.10/dist-packages/lightning/fabric/plugins/precision/transformer_engine.py", line 174, in _convert_layers
    replacement.bias.data = child.bias.data.clone()
AttributeError: 'NoneType' object has no attribute 'data'

What version are you seeing the problem on?

v2.5

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingneeds triageWaiting to be triaged by maintainersver: 2.5.x

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions