Skip to content

Commit 191ab0d

Browse files
authored
Merge pull request #238 from iotamudelta/ifu
Integrate from upstream
2 parents f5504b9 + 1edfd59 commit 191ab0d

File tree

274 files changed

+6589
-3934
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

274 files changed

+6589
-3934
lines changed

.github/ISSUE_TEMPLATE/bug-report.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
---
2+
name: "\U0001F41B Bug Report"
3+
about: Submit a bug report to help us improve PyTorch
4+
5+
---
6+
7+
## 🐛 Bug
8+
9+
<!-- A clear and concise description of what the bug is. -->
10+
11+
## To Reproduce
12+
13+
Steps to reproduce the behavior:
14+
15+
1.
16+
1.
17+
1.
18+
19+
<!-- If you have a code sample, error messages, stack traces, please provide it here as well -->
20+
21+
## Expected behavior
22+
23+
<!-- A clear and concise description of what you expected to happen. -->
24+
25+
## Environment
26+
27+
Please copy and paste the output from our
28+
[environment collection script](https://github.com/raw/pytorch/pytorch/master/torch/utils/collect_env.py)
29+
(or fill out the checklist below manually).
30+
31+
You can get the script and run it with:
32+
```
33+
wget https://github.com/raw/pytorch/pytorch/master/torch/utils/collect_env.py
34+
# For security purposes, please check the contents of collect_env.py before running it.
35+
python collect_env.py
36+
```
37+
38+
- PyTorch Version (e.g., 1.0):
39+
- OS (e.g., Linux):
40+
- How you installed PyTorch (`conda`, `pip`, source):
41+
- Build command you used (if compiling from source):
42+
- Python version:
43+
- CUDA/cuDNN version:
44+
- GPU models and configuration:
45+
- Any other relevant information:
46+
47+
## Additional context
48+
49+
<!-- Add any other context about the problem here. -->
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
name: "\U0001F4DA Documentation"
3+
about: Report an issue related to https://pytorch.org/docs
4+
5+
---
6+
7+
## 📚 Documentation
8+
9+
<!-- A clear and concise description of what content in https://pytorch.org/docs is an issue. If this has to do with the general https://pytorch.org website, please file an issue at https://github.com/pytorch/pytorch.github.io/issues/new/choose instead. If this has to do with https://pytorch.org/tutorials, please file an issue at https://github.com/pytorch/tutorials/issues/new -->
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
---
2+
name: "\U0001F680Feature Request"
3+
about: Submit a proposal/request for a new PyTorch feature
4+
5+
---
6+
7+
## 🚀 Feature
8+
<!-- A clear and concise description of the feature proposal -->
9+
10+
## Motivation
11+
12+
<!-- Please outline the motivation for the proposal. Is your feature request related to a problem? e.g., I'm always frustrated when [...]. If this is related to another GitHub issue, please link here too -->
13+
14+
## Pitch
15+
16+
<!-- A clear and concise description of what you want to happen. -->
17+
18+
## Alternatives
19+
20+
<!-- A clear and concise description of any alternative solutions or features you've considered, if any. -->
21+
22+
## Additional context
23+
24+
<!-- Add any other context or screenshots about the feature request here. -->
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
name: "❓Questions/Help/Support"
3+
about: Do you need support? We have resources.
4+
5+
---
6+
7+
## ❓ Questions and Help
8+
9+
### Please note that this issue tracker is not a help form and this issue will be closed.
10+
11+
We have a set of [listed resources available on the website](https://pytorch.org/resources). Our primary means of support is our discussion forum:
12+
13+
- [Discussion Forum](https://discuss.pytorch.org/)

.jenkins/pytorch/build.sh

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -102,17 +102,6 @@ fi
102102
# Add the test binaries so that they won't be git clean'ed away
103103
git add -f build/bin
104104

105-
# Test C FFI plugins
106-
# cffi install doesn't work for Python 3.7
107-
if [[ "$BUILD_ENVIRONMENT" != *pynightly* ]]; then
108-
# TODO: Don't run this here
109-
pip install cffi
110-
git clone https://github.com/pytorch/extension-ffi.git
111-
pushd extension-ffi/script
112-
python build.py
113-
popd
114-
fi
115-
116105
# Test documentation build
117106
if [[ "$BUILD_ENVIRONMENT" == *xenial-cuda8-cudnn6-py3* ]]; then
118107
pushd docs

.jenkins/pytorch/enabled-configs.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ pytorch-macos-10.13-cuda9.2-cudnn7-py3-build
4040
pytorch-docker-build-test
4141
short-perf-test-cpu
4242
short-perf-test-gpu
43-
py2-clang3.8-rocm1.7.1-ubuntu16.04-build
44-
py2-clang3.8-rocm1.7.1-ubuntu16.04-test
43+
py2-clang7-rocmdeb-ubuntu16.04-build
44+
py2-clang7-rocmdeb-ubuntu16.04-test
4545
pytorch-ppc64le-cuda9.2-cudnn7-py3-build
4646
pytorch-ppc64le-cuda9.2-cudnn7-py3-test
4747
pytorch-ppc64le-cuda9.1-cudnn7-py3-build

.jenkins/pytorch/test.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,7 @@ test_aten() {
102102
SUDO=sudo
103103
fi
104104

105+
${SUDO} ln -s "$TORCH_LIB_PATH"/libc10* build/bin
105106
${SUDO} ln -s "$TORCH_LIB_PATH"/libcaffe2* build/bin
106107
${SUDO} ln -s "$TORCH_LIB_PATH"/libnccl* build/bin
107108

aten/src/ATen/Registry.h

Lines changed: 0 additions & 2 deletions
This file was deleted.

aten/src/ATen/core/Half-inl.h

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -190,6 +190,33 @@ inline AT_HOST_DEVICE Half operator/(int a, Half b) {
190190
return static_cast<Half>(a) / b;
191191
}
192192

193+
//// Arithmetic with longs
194+
inline AT_HOST_DEVICE Half operator+(Half a, long b) {
195+
return a + static_cast<Half>(b);
196+
}
197+
inline AT_HOST_DEVICE Half operator-(Half a, long b) {
198+
return a - static_cast<Half>(b);
199+
}
200+
inline AT_HOST_DEVICE Half operator*(Half a, long b) {
201+
return a * static_cast<Half>(b);
202+
}
203+
inline AT_HOST_DEVICE Half operator/(Half a, long b) {
204+
return a / static_cast<Half>(b);
205+
}
206+
207+
inline AT_HOST_DEVICE Half operator+(long a, Half b) {
208+
return static_cast<Half>(a) + b;
209+
}
210+
inline AT_HOST_DEVICE Half operator-(long a, Half b) {
211+
return static_cast<Half>(a) - b;
212+
}
213+
inline AT_HOST_DEVICE Half operator*(long a, Half b) {
214+
return static_cast<Half>(a) * b;
215+
}
216+
inline AT_HOST_DEVICE Half operator/(long a, Half b) {
217+
return static_cast<Half>(a) / b;
218+
}
219+
193220
/// NOTE: we do not define comparisons directly and instead rely on the implicit
194221
/// conversion from at::Half to float.
195222

aten/src/ATen/core/LegacyTypeDispatch.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,10 @@ LegacyTypeDispatch & globalLegacyTypeDispatch() {
99
return singleton;
1010
}
1111

12-
AT_DEFINE_REGISTRY(LegacyTypeInitRegistry, LegacyTypeInitInterface, LegacyTypeInitArgs)
12+
C10_DEFINE_REGISTRY(
13+
LegacyTypeInitRegistry,
14+
LegacyTypeInitInterface,
15+
LegacyTypeInitArgs)
1316

1417
const LegacyTypeInitInterface& getLegacyTypeInit() {
1518
static std::unique_ptr<LegacyTypeInitInterface> legacy_type_init;

aten/src/ATen/core/LegacyTypeDispatch.h

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,8 +43,12 @@ struct CAFFE2_API LegacyTypeInitInterface {
4343
}
4444
};
4545
struct CAFFE2_API LegacyTypeInitArgs {};
46-
AT_DECLARE_REGISTRY(LegacyTypeInitRegistry, LegacyTypeInitInterface, LegacyTypeInitArgs);
47-
#define REGISTER_LEGACY_TYPE_INIT(clsname) AT_REGISTER_CLASS(LegacyTypeInitRegistry, clsname, clsname)
46+
C10_DECLARE_REGISTRY(
47+
LegacyTypeInitRegistry,
48+
LegacyTypeInitInterface,
49+
LegacyTypeInitArgs);
50+
#define REGISTER_LEGACY_TYPE_INIT(clsname) \
51+
C10_REGISTER_CLASS(LegacyTypeInitRegistry, clsname, clsname)
4852

4953
CAFFE2_API const LegacyTypeInitInterface& getLegacyTypeInit();
5054

0 commit comments

Comments
 (0)