Skip to content

Samsung Exynos AI LiteCore - Lower more ops and add tests to support LLM models - #22829

Merged
Jiseong-oh merged 6 commits into
mainfrom
support_ops_llm
Sep 20, 2026
Merged

Jiseong-oh merged 6 commits into
mainfrom
support_ops_llm

Conversation

@Jiseong-oh

@Jiseong-oh Jiseong-oh commented Sep 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Implemented lowering for additional ops and added tests to support LLM models.

  • Add hardsigmoid, hardswish, hardtanh, layer_norm, maximum, prelu, pixel_unshuffle ops and testcase for supporting LLM.
    and add axis infomation for rms norm.
  • Replacing torch.randint(...).to(device) and torch.zeros(...).to(device) with creation calls that pass device=device

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

@pytorch-bot

pytorch-bot Bot commented Sep 15, 2026 •

Copy link
Copy Markdown

🔗 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 Failures

As of commit ddb7cbe with merge base 11120c8 (image):
💚 Looks good so far! There are no failures yet. 💚

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 15, 2026
@Jiseong-oh Jiseong-oh added partner: samsung For backend delegation, kernels, demo, etc. from the 3rd-party partner, Samsung module: samsung labels Sep 15, 2026
@github-actions

Copy link
Copy Markdown

This PR needs a release notes: label

If your change should be included in the release notes (i.e. would users of this library care about this change?), please use a label starting with release notes:. This helps us keep track and include your important work in the next release notes.

To add a label, you can comment to pytorchbot, for example
@pytorchbot label "release notes: none"

For more information, see
https://github.com/pytorch/pytorch/wiki/PyTorch-AutoLabel-Bot#why-categorize-for-release-notes-and-how-does-it-work.

@Jiseong-oh Jiseong-oh changed the title Samsung Exynos AI LiteCore- Support more ops for llm models Samsung Exynos AI LiteCore - Lower more ops and add tests to support LLM models Sep 15, 2026
@Jiseong-oh
Jiseong-oh requested a review from psiddh September 16, 2026 01:09
) -> bool:
input_id = self.define_tensor(node.args[0], enn_graph, vals_to_ids)

downscale_factor = cast(int, node.args[1])

@psiddh psiddh Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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"]

@psiddh psiddh Sep 16, 2026 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

updated.

Jiseong-oh and others added 5 commits September 17, 2026 05:48
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>
@Jiseong-oh
Jiseong-oh merged commit dba8a83 into main Sep 20, 2026
238 checks passed
@Jiseong-oh
Jiseong-oh deleted the support_ops_llm branch September 20, 2026 02:03

This branch was successfully deployed

1 active deployment
cadence — ddb7cbe7 Deployed Sep 20, 2026 by Jiseong-oh via hifi-op-test / hifi4 #28675
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. module: samsung partner: samsung For backend delegation, kernels, demo, etc. from the 3rd-party partner, Samsung

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants