Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Building DJL For aarch64 #1526

Merged
merged 2 commits into from
Mar 22, 2022
Merged

Building DJL For aarch64 #1526

merged 2 commits into from
Mar 22, 2022

Conversation

hd1080p
Copy link
Contributor

@hd1080p hd1080p commented Mar 15, 2022

Description

This PR adds support for compiling/building Pytorch JNI for aarch64 ARM architecture.

Changelist

  • Adding aarch64 cross-compiler dependencies to build-pytorch-jni-linux in github action
  • Get Python 3.6 to make python3 get-pip.py to get the github action to work (open to just making the script compatible with the latest version)
  • Moved files.each in prepareNativeLib(...) to a separate function
  • Download the necessary dependencies and copy native lib if aarch64 specific
  • Updated Pytorch version to 1.10.2

Testing

  • Ran CXX=aarch64-linux-gnu-gcc ./gradlew compileJNI -Paarch64 -Ppt_version=$PYTORCH_VERSION locally to verify build succeeded.
  • Ran github actions in private repository and succeeded up to the AWS Credentials step (at this point it's been built successfully)

@codecov-commenter
Copy link

codecov-commenter commented Mar 15, 2022

Codecov Report

Merging #1526 (49026fc) into master (bb5073f) will decrease coverage by 1.36%.
The diff coverage is 50.03%.

@@             Coverage Diff              @@
##             master    #1526      +/-   ##
============================================
- Coverage     72.08%   70.72%   -1.37%     
- Complexity     5126     5352     +226     
============================================
  Files           473      500      +27     
  Lines         21970    23370    +1400     
  Branches       2351     2552     +201     
============================================
+ Hits          15838    16528     +690     
- Misses         4925     5558     +633     
- Partials       1207     1284      +77     
Impacted Files Coverage Δ
api/src/main/java/ai/djl/modality/cv/Image.java 69.23% <ø> (-4.11%) ⬇️
...i/djl/modality/cv/translator/BigGANTranslator.java 21.42% <ø> (-5.24%) ⬇️
...odality/cv/translator/BigGANTranslatorFactory.java 33.33% <0.00%> (+8.33%) ⬆️
...nslator/InstanceSegmentationTranslatorFactory.java 14.28% <0.00%> (-3.90%) ⬇️
.../modality/cv/translator/YoloTranslatorFactory.java 8.33% <0.00%> (-1.67%) ⬇️
...i/djl/modality/cv/translator/YoloV5Translator.java 5.69% <0.00%> (ø)
...odality/cv/translator/YoloV5TranslatorFactory.java 8.33% <0.00%> (-1.67%) ⬇️
...pi/src/main/java/ai/djl/ndarray/BytesSupplier.java 54.54% <0.00%> (-12.13%) ⬇️
...pi/src/main/java/ai/djl/repository/Repository.java 83.33% <ø> (ø)
...l/training/loss/SigmoidBinaryCrossEntropyLoss.java 64.00% <0.00%> (ø)
... and 198 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b364e7c...49026fc. Read the comment docs.

Change-Id: If8d7ea74be3ad27bd51c400be6bb20092348bea0
@frankfliu frankfliu merged commit 0968bbb into deepjavalibrary:master Mar 22, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants