Skip to content

Rename jni layer cpp files#17380

Open
mohammed-saalim wants to merge 2 commits intopytorch:mainfrom
mohammed-saalim:rename-jni-layer-cpp-files
Open

Rename jni layer cpp files#17380
mohammed-saalim wants to merge 2 commits intopytorch:mainfrom
mohammed-saalim:rename-jni-layer-cpp-files

Conversation

@mohammed-saalim
Copy link
Contributor

Summary

Renamed JNI layer files to better align with their Java counterparts, improving the name mapping between JNI and Java layers as suggested in #10890.

Changes

  • Renamed jni_layer.cppjni_module.cpp
  • Renamed jni_layer_llama.cppjni_llm_module.cpp
  • Updated all references in:
    • extension/android/CMakeLists.txt
    • extension/android/jni/BUCK
    • extension/android/jni/selective_jni.buck.bzl
    • extension/android/jni/jni_layer_training.cpp

Testing

  • Verified zero remaining references to old filenames
  • All build file references updated correctly
  • Git history preserved via git mv

Fixes #10890

Copilot AI review requested due to automatic review settings February 11, 2026 18:12
@pytorch-bot
Copy link

pytorch-bot bot commented Feb 11, 2026

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/17380

Note: Links to docs will display an error until the docs builds have been completed.

⚠️ 8 Awaiting Approval

As of commit c1de60a with merge base 9f76523 (image):

AWAITING APPROVAL - The following workflows need approval before CI can run:

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 Feb 11, 2026
@github-actions
Copy link

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.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR renames the Android JNI C++ entrypoints to better align file names with their Java counterparts (per #10890), and updates build-system references accordingly.

Changes:

  • Renamed the core JNI source file reference from jni_layer.cpp to jni_module.cpp across Buck/CMake.
  • Renamed the LLM JNI source file reference from jni_layer_llama.cpp to jni_llm_module.cpp across Buck/CMake.
  • Updated internal references/comments to reflect the new filenames.

Reviewed changes

Copilot reviewed 4 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
extension/android/jni/selective_jni.buck.bzl Updates selective JNI target to point at jni_module.cpp.
extension/android/jni/jni_module.cpp New/renamed core JNI implementation file.
extension/android/jni/jni_llm_module.cpp New/renamed LLM JNI implementation file.
extension/android/jni/jni_layer_training.cpp Updates comment referencing the renamed core JNI file.
extension/android/jni/BUCK Updates Buck build targets to use renamed JNI sources and export the new filename.
extension/android/CMakeLists.txt Updates CMake sources list to use renamed JNI sources.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Renamed JNI layer files to better align with their Java counterparts:
- jni_layer.cpp -> jni_module.cpp
- jni_layer_llama.cpp -> jni_llm_module.cpp

Updated all references in build files (CMakeLists.txt, BUCK, selective_jni.buck.bzl)
and comments to reflect the new names.

Fixes pytorch#10890
@mohammed-saalim mohammed-saalim force-pushed the rename-jni-layer-cpp-files branch from 8c01cd5 to 92a927d Compare February 11, 2026 18:16
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Android] Rename JNI cpp file

1 participant