Skip to content
Snippets Groups Projects
  • Christophe Guillon's avatar
    cb0748a7
    [Tensor] Disambiguate undefined Tensor dimensions from Scalar Tensor · cb0748a7
    Christophe Guillon authored and Maxence Naud's avatar Maxence Naud committed
    Define a Tensor with undefined dims by explicitly setting mSize to 0.
    Provide undefined() method which must be used instead of empty()
    to test whether a Tensor as associated dimensions and can be used
    for forwarding dimensions downward.
    This disambiguates from defined scalar Tensor which actually have
    empty dimensions, but size of 1.
    Note that as soon as a Tensor with undefined dimensions is resized,
    it's dimensions are permanently defined (though may still change).
    
    This change solves issues in operators forwardDims() when
    input values are scalar, i.e. !undefined() and empty().
    cb0748a7
    History
    [Tensor] Disambiguate undefined Tensor dimensions from Scalar Tensor
    Christophe Guillon authored and Maxence Naud's avatar Maxence Naud committed
    Define a Tensor with undefined dims by explicitly setting mSize to 0.
    Provide undefined() method which must be used instead of empty()
    to test whether a Tensor as associated dimensions and can be used
    for forwarding dimensions downward.
    This disambiguates from defined scalar Tensor which actually have
    empty dimensions, but size of 1.
    Note that as soon as a Tensor with undefined dimensions is resized,
    it's dimensions are permanently defined (though may still change).
    
    This change solves issues in operators forwardDims() when
    input values are scalar, i.e. !undefined() and empty().
Code owners
Assign users and groups as approvers for specific file changes. Learn more.