glow icon indicating copy to clipboard operation
glow copied to clipboard

torch_glow support for index operator in PytorchModelLoader

Open debayan-gh opened this issue 4 years ago • 1 comments

Hi @jfix71 , The aten::index op is not currently supported by glow PytorchModelLoader. The index operator takes a list of Tensors as input. Is there a plan to support loading a list of tensors as a constant so that ops like index can be added in Pytorch Model loader ? Or if we can have a fused op in this case . What would be the preferred way of adding this support?

e.g below traced graph for pytorch code: r = c[[0,1], [0,1]]


   %20 : Tensor?[] = prim::Constant[value=annotate(List[Optional[Tensor]], [ 0  1 [ CPULongType{2} ],  0  1 [ CPULongType{2} ]])]()
  %15 : Tensor = aten::index(%c, %20)

debayan-gh avatar Oct 05 '20 12:10 debayan-gh

CC: @jackm321 @mortzur @zrphercule2

jfix71 avatar Oct 14 '20 16:10 jfix71