Yifan Shen

Results 18 issues of Yifan Shen

In [ExecuTorch PR 1802](https://github.com/pytorch/executorch/pull/1802), the const handling are changed: Some buffers are no longer available in `ExportedProgram.state_dict` However, CoreMLTools EXIR converter does rely on `ExportedProgram.state_dict` to retrieve all constants 🤦...

feature request
PyTorch (not traced)

This is the root cause to many issues. When symbolic shape is involved in `torch.listconstruct`, instead of a CoreML tensor, we simply return the list as is ``` def _array_construct(context,...

bug

This toy model fails to export in ExecuTorch ``` model = ModuleWrapper( function=nn.functional.scaled_dot_product_attention, kwargs={ "attn_mask": None, "is_causal": True, }, ) ``` due to ``` def assert_functional_graph(fx_g: torch.fx.Graph) -> int: placeholders...

bug
triaged
ExecuTorch

This toy model fails in ExecuTorch ``` class IndexModel(torch.nn.Module): def __init__(self, axis): super().__init__() self.axis = axis def forward(self, x, y): index = y > 0.5 if self.axis == 0: return...

bug
triaged
ExecuTorch

This toy model fails in ExecuTorch ``` class M(torch.nn.Module): def forward(self, float_arr, int_arr): dynamic_index = int_arr[1] float_arr[dynamic_index] = 12.95 return float_arr ``` due to ``` E torch._dynamo.exc.UserError: Consider annotating your...

bug

## 🐞Describing the bug This simple model can be converted but gives incorrect result ``` class IndexPutModel(torch.nn.Module): def forward(self, x, position, val): y = x.clone() y[:, position] = val return...

bug
PyTorch (traced)

Very weird, that some EXIR index put models fail only on neural network backend. Probably some neural network backend specific graph pass are wrong

bug
NN backend only
ExecuTorch

This toy model fails in ExecuTorch ``` class IndexModel(torch.nn.Module): def forward(self, x): if len(shape) == 2: return x[:, :] elif len(shape) == 4: return x[:] ``` It contains only a...

feature request
triaged
ExecuTorch

## 🌱 Describe your Feature Request When we look at how CoreMLTools PyTorch converter deal with PyTorch data types in [utils.py](https://github.com/apple/coremltools/blob/main/coremltools/converters/mil/frontend/torch/utils.py#L19-L24) ``` NUM_TO_TORCH_DTYPE = { ... 2: torch.int16, 3: torch.int32,...

feature request
triaged

When we try to partition certain models on to Core ML delegation, we were hit by ``` ValueError: Rank-0 (input None) is unsupported ``` This is because Core ML does...

module: exir
module: coreml