func.func @test_scatternd(
%data: !torch.vtensor<[18,8,64,64],f32>,
%indices: !torch.vtensor<[18,4,2],si64>,
%updates: !torch.vtensor<[18,4,64,64],f32>
) -> !torch.vtensor<[18,8,64,64],f32>
attributes {torch.onnx_meta.opset_version = 13 : si64} {
%0 = torch.operator "onnx.ScatterND"(%data, %indices, %updates)
: (!torch.vtensor<[18,8,64,64],f32>, !torch.vtensor<[18,4,2],si64>, !torch.vtensor<[18,4,64,64],f32>)
-> !torch.vtensor<[18,8,64,64],f32>
return %0 : !torch.vtensor<[18,8,64,64],f32>
}
%25 = torch.prim.ListConstruct %0, %1, %2, %3 : (!torch.int, !torch.int, !torch.int, !torch.int) -> !torch.list<int>
%26 = torch.aten.unflatten.int %24, %int0_0, %25 : !torch.vtensor<[144,64,64],f32>, !torch.int, !torch.list<int> -> !torch.vtensor<[18,8,64,64],f32>
SmallVector<Value> unflattenIndicesDims;
for (int64_t i = 0; i < indicesLastDim; ++i) {
unflattenIndicesDims.push_back(dataDims[i]);
}