Samsung Exynos AI LiteCore - Lower more ops and add tests to support LLM models - #22829
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/22829
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit ddb7cbe with merge base 11120c8 ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
This PR needs a
|
| ) -> bool: | ||
| input_id = self.define_tensor(node.args[0], enn_graph, vals_to_ids) | ||
|
|
||
| downscale_factor = cast(int, node.args[1]) |
There was a problem hiding this comment.
Could we validate the input rank before reporting this node as supported? aten.pixel_unshuffle accepts rank-3 and higher inputs, while ENN SPACE_TO_DEPTH may only support 4-D tensors. Since the support checker trusts the visitor return value, unsupported ranks could be delegated incorrectly. Please reject unsupported ranks or add tests confirming ENN supports them.
There was a problem hiding this comment.
Thanks @psiddh it's good point. I updated it.
| .check_count({"torch.ops.aten.layer_norm.default": 1}) | ||
| .to_edge_transform_and_lower() | ||
| .check_not( | ||
| ["executorch_exir_dialects_edge__ops_aten_native_layer_norm_default"] |
There was a problem hiding this comment.
This checks native_layer_norm, but the op exported and preserved by this test is layer_norm. Could this check executorch_exir_dialects_edge__ops_aten_layer_norm_default instead, so it verifies that the op under test was delegated?
Add the right axis info for rms norm. Signed-off-by: Jiseong oh <jiseong.oh@samsung.com> Co-authored-by: Xiongzhan Linghu <xz.linghu@samsung.com>
Add supporting the following 6 ops. - hardsigmoid, hardswish, hardtanh - layer_norm, maximum, prelu - Add test cases for these ops. Signed-off-by: Jiseong Oh <jiseong.oh@samsung.com> Co-authored-by: Xiongzhan Linghu <xz.linghu@samsung.com>
- torch.randint(...).to(device) and torch.zeros(...).to(device) allocate on CPU and then copy to device; passing device= to the creation call skips that copy. Signed-off-by: Jiseong Oh <jiseong.oh@samsung.com>
- Add aten.pixel_unshuffle op and test Signed-off-by: Jiseong Oh <jiseong.oh@samsung.com>
Signed-off-by: jiseong.oh <jiseong.oh@samsung.com>
d4894a1 to
80239f1
Compare
Summary
Implemented lowering for additional ops and added tests to support LLM models.
and add axis infomation for rms norm.
Test plan
pytest backends/samsung/test/ops/test_hardsigmoid.py
backends/samsung/test/ops/test_hardswish.py
backends/samsung/test/ops/test_hardtanh.py
backends/samsung/test/ops/test_layer_norm.py
backends/samsung/test/ops/test_maximum.py
backends/samsung/test/ops/test_prelu.py
backends/samsung/test/ops/test_pixel_unshuffle.py -v
cc @SS-JIA @digantdesai @kimishpatel