Skip to content

Incorrect traced code for upsampling functions #339

@avik-pal

Description

@avik-pal
julia> using NNlib, Reactant

julia> x_ra = ConcreteRArray(rand(2, 3))
2×3 ConcreteRArray{Float64, 2}:
 0.676046  0.592415  0.272159
 0.569563  0.666342  0.390131

julia> @code_hlo upsample_nearest(x_ra, (2, 2))
module {
  func.func @main(%arg0: tensor<3x2xf64>) -> tensor<6x4xf64> {
    %cst = stablehlo.constant dense<0.000000e+00> : tensor<6x4xf64>
    return %cst : tensor<6x4xf64>
  }
}

julia> @jit upsample_nearest(x_ra, (2, 2))
4×6 ConcreteRArray{Float64, 2}:
 0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0
 0.0  0.0  0.0  0.0  0.0  0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions