Skip to content

Commit 15b03c0

Browse files
committed
Add pytorch assets
1 parent 0dcddd6 commit 15b03c0

File tree

3 files changed

+81
-0
lines changed

3 files changed

+81
-0
lines changed

pytorch/CHANGELOG.md

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
## Pytorch configuration and build command
2+
3+
Version 0.1.0
4+
----
5+
6+
Released on 2020-03-08
7+
8+
- Build on `debian:stretch, GLIBC~2.24, python==3.7.6`, based on v1.4.0
9+
- Build command:
10+
```
11+
$ CMAKE_VERBOSE_MAKEFILE=ON BUILD_BINARY=ON BLAS=OpenBLAS _GLIBCXX_USE_CXX11_ABI=ON PSIMD_SOURCE_DIR=/root/pytorch/third_party/psimd BUILD_TEST=OFF BUILD_CUSTOM_PROTOBUF=OFF Protobuf_LIBRARY=/usr/lib/x86_64-linux-gnu/libprotobuf.a Protobuf_INCLUDE_DIR=/usr/include CMAKE_BUILD_TYPE=Release python setup.py bdist_wheel --cmake
12+
```
13+
- Reference:
14+
- https://github.com/pytorch/pytorch/issues/28775
15+
- MD5
16+
```
17+
846cfda37f600aefd283ab59df45ff2f torch-1.4.0a0+21152dc-cp37-cp37m-linux_mips64.whl
18+
```
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
From 21152dc97b30818ea2bc4ceff2cb2cfa697f2d92 Mon Sep 17 00:00:00 2001
2+
From: fake <[email protected]>
3+
Date: Sun, 8 Mar 2020 07:48:59 +0000
4+
Subject: [PATCH pytorch] support mips arch in v1.4.0
5+
6+
---
7+
aten/src/TH/vector/simd.h | 2 +-
8+
tools/setup_helpers/cmake.py | 1 +
9+
2 files changed, 2 insertions(+), 1 deletion(-)
10+
11+
diff --git a/aten/src/TH/vector/simd.h b/aten/src/TH/vector/simd.h
12+
index 8f77d24348..87732ca6c3 100644
13+
--- a/aten/src/TH/vector/simd.h
14+
+++ b/aten/src/TH/vector/simd.h
15+
@@ -72,7 +72,7 @@ static inline uint32_t detectHostSIMDExtensions()
16+
17+
#endif
18+
19+
-#elif defined(__s390x__)
20+
+#elif defined(__s390x__) || defined(__mips__)
21+
22+
static inline uint32_t detectHostSIMDExtensions()
23+
{
24+
diff --git a/tools/setup_helpers/cmake.py b/tools/setup_helpers/cmake.py
25+
index 33d650a2d5..23f1e992c0 100644
26+
--- a/tools/setup_helpers/cmake.py
27+
+++ b/tools/setup_helpers/cmake.py
28+
@@ -216,6 +216,7 @@ class CMake:
29+
'_GLIBCXX_USE_CXX11_ABI': 'GLIBCXX_USE_CXX11_ABI',
30+
'CUDNN_LIB_DIR': 'CUDNN_LIBRARY',
31+
'USE_CUDA_STATIC_LINK': 'CAFFE2_STATIC_LINK_CUDA',
32+
+ 'PSIMD_SOURCE_DIR': 'PSIMD_SOURCE_DIR',
33+
'USE_GLOO_IBVERBS': 'USE_IBVERBS' # Backward compatibility. Will be removed in the future.
34+
}
35+
additional_options.update({
36+
--
37+
2.20.1
38+
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
From 7831caa1eaef85e1e22ceabcccdc167e54f387c9 Mon Sep 17 00:00:00 2001
2+
From: fake <[email protected]>
3+
Date: Sun, 8 Mar 2020 07:51:55 +0000
4+
Subject: [PATCH pytorch] third_party/sleef: add support mips arch in v1.4.0
5+
6+
---
7+
src/arch/helperpurec_scalar.h | 2 +-
8+
1 file changed, 1 insertion(+), 1 deletion(-)
9+
10+
diff --git a/src/arch/helperpurec_scalar.h b/src/arch/helperpurec_scalar.h
11+
index 9c11ace..5565577 100644
12+
--- a/src/arch/helperpurec_scalar.h
13+
+++ b/src/arch/helperpurec_scalar.h
14+
@@ -43,7 +43,7 @@
15+
#define ENABLE_FMA_DP
16+
#define ENABLE_FMA_SP
17+
18+
-#if defined(__AVX2__) || defined(__aarch64__) || defined(__arm__) || defined(__powerpc64__)
19+
+#if defined(__AVX2__) || defined(__aarch64__) || defined(__arm__) || defined(__powerpc64__) || defined(__mips__)
20+
#ifndef FP_FAST_FMA
21+
#define FP_FAST_FMA
22+
#endif
23+
--
24+
2.20.1
25+

0 commit comments

Comments
 (0)