Skip to content

Commit fd088b3

Browse files
committed
Merge branch 'master' of https://github.com/pytorch/pytorch into dirichlet_grad-cuda-support
2 parents c4978dc + 5fcd37b commit fd088b3

File tree

85 files changed

+4656
-563
lines changed

Some content is hidden

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

85 files changed

+4656
-563
lines changed

.jenkins/caffe2/bench.sh

Lines changed: 24 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,30 +17,44 @@ fi
1717
caffe2_pypath="$(cd /usr && $PYTHON -c 'import os; import caffe2; print(os.path.dirname(os.path.realpath(caffe2.__file__)))')"
1818
# Resnet50
1919
if (( $num_gpus == 0 )); then
20-
"$PYTHON" "$caffe2_pypath/python/examples/resnet50_trainer.py" --train_data null --batch_size 128 --epoch_size 12800 --num_epochs 2 --use_cpu
20+
"$PYTHON" "$caffe2_pypath/python/examples/imagenet_trainer.py" --train_data null --batch_size 128 --epoch_size 12800 --num_epochs 2 --use_cpu
2121
fi
2222
if (( $num_gpus >= 1 )); then
23-
"$PYTHON" "$caffe2_pypath/python/examples/resnet50_trainer.py" --train_data null --batch_size 128 --epoch_size 12800 --num_epochs 2 --num_gpus 1
24-
"$PYTHON" "$caffe2_pypath/python/examples/resnet50_trainer.py" --train_data null --batch_size 256 --epoch_size 25600 --num_epochs 2 --num_gpus 1 --float16_compute --dtype float16
23+
"$PYTHON" "$caffe2_pypath/python/examples/imagenet_trainer.py" --train_data null --batch_size 128 --epoch_size 12800 --num_epochs 2 --num_gpus 1
24+
"$PYTHON" "$caffe2_pypath/python/examples/imagenet_trainer.py" --train_data null --batch_size 256 --epoch_size 25600 --num_epochs 2 --num_gpus 1 --float16_compute --dtype float16
2525
fi
2626
if (( $num_gpus >= 2 )); then
27-
"$PYTHON" "$caffe2_pypath/python/examples/resnet50_trainer.py" --train_data null --batch_size 256 --epoch_size 25600 --num_epochs 2 --num_gpus 2
27+
"$PYTHON" "$caffe2_pypath/python/examples/imagenet_trainer.py" --train_data null --batch_size 256 --epoch_size 25600 --num_epochs 2 --num_gpus 2
2828
fi
2929
if (( $num_gpus >= 4 )); then
30-
"$PYTHON" "$caffe2_pypath/python/examples/resnet50_trainer.py" --train_data null --batch_size 512 --epoch_size 51200 --num_epochs 2 --num_gpus 4
30+
"$PYTHON" "$caffe2_pypath/python/examples/imagenet_trainer.py" --train_data null --batch_size 512 --epoch_size 51200 --num_epochs 2 --num_gpus 4
3131
fi
3232

3333
# ResNext
3434
if (( $num_gpus == 0 )); then
35-
"$PYTHON" "$caffe2_pypath/python/examples/resnet50_trainer.py" --resnext_num_groups 32 --resnext_width_per_group 4 --num_layers 101 --train_data null --batch_size 32 --epoch_size 3200 --num_epochs 2 --use_cpu
35+
"$PYTHON" "$caffe2_pypath/python/examples/imagenet_trainer.py" --resnext_num_groups 32 --resnext_width_per_group 4 --num_layers 101 --train_data null --batch_size 32 --epoch_size 3200 --num_epochs 2 --use_cpu
3636
fi
3737
if (( $num_gpus >= 1 )); then
38-
"$PYTHON" "$caffe2_pypath/python/examples/resnet50_trainer.py" --resnext_num_groups 32 --resnext_width_per_group 4 --num_layers 101 --train_data null --batch_size 32 --epoch_size 3200 --num_epochs 2 --num_gpus 1
39-
"$PYTHON" "$caffe2_pypath/python/examples/resnet50_trainer.py" --resnext_num_groups 32 --resnext_width_per_group 4 --num_layers 101 --train_data null --batch_size 64 --epoch_size 3200 --num_epochs 2 --num_gpus 1 --float16_compute --dtype float16
38+
"$PYTHON" "$caffe2_pypath/python/examples/imagenet_trainer.py" --resnext_num_groups 32 --resnext_width_per_group 4 --num_layers 101 --train_data null --batch_size 32 --epoch_size 3200 --num_epochs 2 --num_gpus 1
39+
"$PYTHON" "$caffe2_pypath/python/examples/imagenet_trainer.py" --resnext_num_groups 32 --resnext_width_per_group 4 --num_layers 101 --train_data null --batch_size 64 --epoch_size 3200 --num_epochs 2 --num_gpus 1 --float16_compute --dtype float16
4040
fi
4141
if (( $num_gpus >= 2 )); then
42-
"$PYTHON" "$caffe2_pypath/python/examples/resnet50_trainer.py" --resnext_num_groups 32 --resnext_width_per_group 4 --num_layers 101 --train_data null --batch_size 64 --epoch_size 6400 --num_epochs 2 --num_gpus 2
42+
"$PYTHON" "$caffe2_pypath/python/examples/imagenet_trainer.py" --resnext_num_groups 32 --resnext_width_per_group 4 --num_layers 101 --train_data null --batch_size 64 --epoch_size 6400 --num_epochs 2 --num_gpus 2
4343
fi
4444
if (( $num_gpus >= 4 )); then
45-
"$PYTHON" "$caffe2_pypath/python/examples/resnet50_trainer.py" --resnext_num_groups 32 --resnext_width_per_group 4 --num_layers 101 --train_data null --batch_size 128 --epoch_size 12800 --num_epochs 2 --num_gpus 4
45+
"$PYTHON" "$caffe2_pypath/python/examples/imagenet_trainer.py" --resnext_num_groups 32 --resnext_width_per_group 4 --num_layers 101 --train_data null --batch_size 128 --epoch_size 12800 --num_epochs 2 --num_gpus 4
46+
fi
47+
48+
# Shufflenet
49+
if (( $num_gpus == 0 )); then
50+
"$PYTHON" "$caffe2_pypath/python/examples/imagenet_trainer.py" --train_data null --batch_size 32 --epoch_size 3200 --num_epochs 2 --use_cpu --model shufflenet
51+
fi
52+
if (( $num_gpus >= 1 )); then
53+
"$PYTHON" "$caffe2_pypath/python/examples/imagenet_trainer.py" --train_data null --batch_size 32 --epoch_size 3200 --num_epochs 2 --num_gpus 1 --model shufflenet
54+
fi
55+
if (( $num_gpus >= 2 )); then
56+
"$PYTHON" "$caffe2_pypath/python/examples/imagenet_trainer.py" --train_data null --batch_size 64 --epoch_size 6400 --num_epochs 2 --num_gpus 2 --model shufflenet
57+
fi
58+
if (( $num_gpus >= 4 )); then
59+
"$PYTHON" "$caffe2_pypath/python/examples/imagenet_trainer.py" --train_data null --batch_size 128 --epoch_size 12800 --num_epochs 2 --num_gpus 4 --model shufflenet
4660
fi

aten/src/ATen/Declarations.cwrap

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2625,7 +2625,6 @@
26252625
- floating_point
26262626
backends:
26272627
- CPU
2628-
- CUDA
26292628
return: argument 0
26302629
variants:
26312630
- function
@@ -2665,7 +2664,6 @@
26652664
- floating_point
26662665
backends:
26672666
- CPU
2668-
- CUDA
26692667
cname: normal
26702668
variants: function
26712669
return: self
@@ -2685,7 +2683,6 @@
26852683
- floating_point
26862684
backends:
26872685
- CPU
2688-
- CUDA
26892686
cname: cauchy
26902687
variants: function
26912688
return: self

aten/src/ATen/core/Dict.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -129,6 +129,8 @@ class DictIterator final : public std::iterator<std::forward_iterator_tag, DictE
129129
friend class DictIterator<Key, Value, typename detail::DictImpl::dict_map_type::iterator>;
130130
friend class DictPtr<Key, Value>;
131131
friend bool operator==<Key, Value, Iterator>(const DictIterator& lhs, const DictIterator& rhs);
132+
133+
// TODO We also need comparison operators <, >, <=, >=, see ListIterator.
132134
};
133135

134136
template<class Key, class Value, class Iterator>

0 commit comments

Comments
 (0)