From 8fce4ebf0eceda51abbce6448ca029fb5599899c Mon Sep 17 00:00:00 2001
From: Xin Yang <105740670+xyang16@users.noreply.github.com>
Date: Tue, 27 Sep 2022 13:07:39 -0700
Subject: [PATCH] [doc] Add Mac M1 info in docs (#2040)
---
docs/development/dependency_management.md | 11 +++++++----
engines/pytorch/pytorch-engine/README.md | 22 ++++++++++++++++++++++
2 files changed, 29 insertions(+), 4 deletions(-)
diff --git a/docs/development/dependency_management.md b/docs/development/dependency_management.md
index 9b4cda14ce6..04646a17513 100644
--- a/docs/development/dependency_management.md
+++ b/docs/development/dependency_management.md
@@ -6,7 +6,7 @@ This document outlines how DJL manages its dependencies and how developers can f
We try our best to minimize the external dependencies. The core DJL library only has 4 external dependencies:
-- [sl4fj-api](https://mvnrepository.com/artifact/ai.djl/api)
+- [sl4fj-api](https://mvnrepository.com/artifact/org.slf4j/slf4j-api)
- [Gson](https://mvnrepository.com/artifact/com.google.code.gson/gson)
- [JNA](https://mvnrepository.com/artifact/net.java.dev.jna/jna)
- [apache-commons-compress](https://mvnrepository.com/artifact/org.apache.commons/commons-compress)
@@ -58,17 +58,20 @@ See [How to use DJL's BOM](../../bom/README.md#how-to-use-djls-bom) for detail.
| [ai.djl.pytorch](https://search.maven.org/search?q=g:ai.djl.pytorch) | [pytorch-engine](../../engines/pytorch/pytorch-engine/README.md#installation) | PyTorch engine adapter |
| | [pytorch-model-zoo](../../engines/pytorch/pytorch-model-zoo/README.md#installation) | Contains state of the art PyTorch torch script models |
| | [pytorch-native-cpu(osx-x86_64)](../../engines/pytorch/pytorch-engine/README.md#macos) | Contains PyTorch native library for macOS |
+| | [pytorch-native-cpu(osx-aarch64)](../../engines/pytorch/pytorch-engine/README.md#macos-m1) | Contains PyTorch native library for macOS M1 |
| | [pytorch-native-cpu(win-x86_64)](../../engines/pytorch/pytorch-engine/README.md#windows-cpu) | Contains PyTorch native library for Windows |
| | [pytorch-native-cpu(linux-x86_64)](../../engines/pytorch/pytorch-engine/README.md#linux-cpu) | Contains PyTorch native library for Linux |
-| | [pytorch-native-cu113(linux-x86_64)](../../engines/pytorch/pytorch-engine/README.md#linux-gpu) | Contains PyTorch native library for Linux with CUDA 11.3 |
-| | [pytorch-native-cu113(win-x86_64)](../../engines/pytorch/pytorch-engine/README.md#windows-gpu) | Contains PyTorch native library for Windows with CUDA 11.3 |
+| | [pytorch-native-cu116(linux-x86_64)](../../engines/pytorch/pytorch-engine/README.md#linux-gpu) | Contains PyTorch native library for Linux with CUDA 11.6 |
+| | [pytorch-native-cu116(win-x86_64)](../../engines/pytorch/pytorch-engine/README.md#windows-gpu) | Contains PyTorch native library for Windows with CUDA 11.6 |
| | [pytorch-native-cu102(linux-x86_64)](../../engines/pytorch/pytorch-engine/README.md#linux-gpu) | Contains PyTorch native library for Linux with CUDA 10.2 |
| | [pytorch-native-cu102(win-x86_64)](../../engines/pytorch/pytorch-engine/README.md#windows-gpu) | Contains PyTorch native library for Windows with CUDA 10.2 |
-| | [pytorch-native-cu113-precxx11(linux-x86_64)](../../engines/pytorch/pytorch-engine/README.md#for-pre-cxx11-build) | Contains PyTorch native library for Linux with CUDA 11.3 |
+| | [pytorch-native-cu116-precxx11(linux-x86_64)](../../engines/pytorch/pytorch-engine/README.md#for-pre-cxx11-build) | Contains PyTorch native library for Linux with CUDA 11.6 |
| | [pytorch-native-cpu-precxx11(linux-x86_64)](../../engines/pytorch/pytorch-engine/README.md#for-pre-cxx11-build) | Contains PyTorch native library for centOS 7 and Ubuntu 14.04 |
| | [pytorch-native-cpu-precxx11(linux-aarch64)](../../engines/pytorch/pytorch-engine/README.md#for-aarch64-build) | Contains PyTorch native library for Linux ARM |
| | [pytorch-jni](../../engines/pytorch/pytorch-engine/README.md) | Contains PyTorch JNI native library |
| | pytorch-native-auto (deprecated) | No longer needed since DJL 0.15.0 |
+| | pytorch-native-cu113(linux-x86_64) (deprecated) | Contains PyTorch native library for Linux with CUDA 11.3 |
+| | pytorch-native-cu113(win-x86_64) (deprecated) | Contains PyTorch native library for Windows with CUDA 11.3 |
| | pytorch-native-cu111(linux-x86_64) (deprecated) | Contains PyTorch native library for Linux with CUDA 11.1 |
| | pytorch-native-cu111(win-x86_64) (deprecated) | Contains PyTorch native library for Windows with CUDA 11.1 |
| | pytorch-native-cu101(linux-x86_64) (deprecated) | Contains PyTorch native library <= 1.7.1 for Linux with CUDA 10.1 |
diff --git a/engines/pytorch/pytorch-engine/README.md b/engines/pytorch/pytorch-engine/README.md
index 31d71b6df68..632cf4e5f63 100644
--- a/engines/pytorch/pytorch-engine/README.md
+++ b/engines/pytorch/pytorch-engine/README.md
@@ -99,6 +99,28 @@ For macOS, you can use the following library:
```
+### macOS M1
+For macOS M1, you can use the following library:
+
+- ai.djl.pytorch:pytorch-jni:1.12.1-0.19.0
+- ai.djl.pytorch:pytorch-native-cpu:1.12.1:osx-aarch64
+
+```xml
+
+ ai.djl.pytorch
+ pytorch-native-cpu
+ osx-aarch64
+ 1.12.1
+ runtime
+
+
+ ai.djl.pytorch
+ pytorch-jni
+ 1.12.1-0.19.0
+ runtime
+
+```
+
### Linux
For the Linux platform, you can choose between CPU, GPU. If you have NVIDIA [CUDA](https://en.wikipedia.org/wiki/CUDA)
installed on your GPU machine, you can use one of the following library: