Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
56 commits
Select commit Hold shift + click to select a range
c45607f
Static assert GetMutable is not passed with Tensor argument (#11323)
ezyang Sep 7, 2018
3149a72
Move TensorOptions.cpp to the correct place in ATen/core (#11244)
ezyang Sep 7, 2018
2946b02
Disable flaky test, see #11360 (#11361)
ezyang Sep 7, 2018
c59c1a2
diagnose option: get_entry to print a whole row (#11308)
Sep 7, 2018
b3b1e76
Optional expand=True kwarg in distribution.enumerate_support (#11231)
neerajprad Sep 7, 2018
a2afad2
Improves ATen CUDAEvent (#11293)
mruberry Sep 7, 2018
f9595e7
typo/grammar fixes (#11344)
rasbt Sep 7, 2018
da4ebc2
Switch SVD on CPU from gesvd to gesdd (#11194)
vishwakftw Sep 7, 2018
68371b6
fast code path when partition=1 which makes LengthsPartition a simple…
jspark1105 Sep 7, 2018
b02b125
Rename getMaybeVariableType back to getType. (#11250)
ezyang Sep 7, 2018
396e64f
Move ATen/Registry.h to ATen/core/Registry.h (#11270)
ezyang Sep 7, 2018
52b37d8
Move VariableHooksInterface to ATen/core (#11273)
ezyang Sep 7, 2018
110191e
Remove detach from TensorImpl, handle via Type. (#11337)
gchanan Sep 7, 2018
91089a7
Add GPU implementation of pdist (#11102)
erikbrinkman Sep 7, 2018
e80f7e1
Fix more warnings (#11320)
ssnl Sep 7, 2018
fb4e808
Remove methods that start with an underscore from at::Tensor (#11152)
goldsborough Sep 7, 2018
5e400e9
move context_base.h to ATen/core (#11336)
jerryzh168 Sep 7, 2018
733402b
Fix issues with certain heterogeneous types in lists during tensor cr…
vishwakftw Sep 7, 2018
ba6f103
update CUDAExtension doc (#11370)
wangg12 Sep 7, 2018
01930a3
Move sync_params to C++ (#9805)
goldsborough Sep 7, 2018
e9da2dd
Do not use PERSISTENT cudnn mode for spatialBN (#11382)
xw285cornell Sep 7, 2018
576807c
flaky test fix trial (#11391)
teng-li Sep 7, 2018
69b4b45
enable missing nn tests with single grad check, minor refactor
wanchaol Sep 7, 2018
7de0332
Add initial documentation for JIT (#11357)
zdevito Sep 7, 2018
77b6d7d
Doc improvements (#11347)
goldsborough Sep 7, 2018
93da5a2
Update variable view note
ssnl Sep 7, 2018
802d21c
Remove FULL_CAFFE2 flag (#11321)
orionr Sep 7, 2018
9886ebe
Remove hardcoded system path from CMAKE_MODULE_PATH (#11386)
pietern Sep 7, 2018
4bf5fc4
Fix split_size test failures (#11051)
Sep 7, 2018
4c8cc36
Fix igios build (#11392)
xiaomengy Sep 7, 2018
4ae16c9
Recursive descent for validation + convert expands in ATen fal… (#11356)
Sep 7, 2018
31d36b1
move complex registration test out-of-line (#11397)
goldsborough Sep 7, 2018
c9843bd
Update googletest to release-1.8.1 (#11388)
Yangqing Sep 7, 2018
fa522d1
Revert D9720931: [pytorch][PR] [third-party] Update googletest to rel…
pjh5 Sep 8, 2018
c49b01a
Change default variants to 'function'. (#11247)
ezyang Sep 8, 2018
b7a2c91
remove unnecessary clone() when .grad is None (#11165)
FDecaYed Sep 8, 2018
47c1de2
Test exporting batch norm, dropout, RNN
Sep 8, 2018
3d28625
Support send/recv for the gloo process group (#11387)
pietern Sep 8, 2018
505ecab
bumping up the default store timeout (#11409)
teng-li Sep 8, 2018
b9b9ae9
Make torch.randint have default dtype int64 (#11040)
ssnl Sep 8, 2018
9687a72
Move the type registry out of Context, into LegacyTypeDispatch. (#11274)
ezyang Sep 8, 2018
802380a
Improve LegacyTypeDispatch to handle initialization correctly. (#11331)
ezyang Sep 8, 2018
d3f98b5
Add matrix power (#11421)
ssnl Sep 8, 2018
ac9268f
Conversions to and from complex numbers. (#11420)
ezyang Sep 8, 2018
02114e8
fix #10838 incorrect bidirectional output format (#11368)
tengyifei Sep 8, 2018
538ea67
Search for CMake config files for pybind11. (#11423)
tolia-msft Sep 9, 2018
6683fb5
Add AVX optimizations for pdist (#11230)
erikbrinkman Sep 9, 2018
b7ecf03
Updates FindCUDA.cmake to 3.12.2 upstream version (#11406)
syed-ahmed Sep 9, 2018
1b94f5c
optimize masked_fill on CPU (#11359)
mingfeima Sep 9, 2018
ee4309a
override BUILD_TEST when building gloo (#11431)
soumith Sep 9, 2018
581099a
pybind conversion for IntList (#11425)
t-vi Sep 9, 2018
87b2f05
Also set stdin to subprocess pipe in FindCUDNN windows popen call (#1…
mattdawkins Sep 9, 2018
560d6ef
Only join started dataloader workers (#11432)
ssnl Sep 9, 2018
87a9a8f
Use AT_CHECK and AT_ERROR
ssnl Sep 10, 2018
cee743f
Move backward/set_data to Type-based dispatch.
gchanan Sep 10, 2018
6d0674e
Merge remote-tracking branch 'upstream/master' into ifu
iotamudelta Sep 10, 2018
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .jenkins/caffe2/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ else
export MAX_JOBS=`expr $(nproc) - 1`
fi

FULL_CAFFE2=1 python setup.py install --user
USE_OPENCV=1 BUILD_BINARY=1 python setup.py install --user

# This is to save test binaries for testing
cp -r torch/lib/tmp_install $INSTALL_PREFIX
Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ include(CMakeDependentOption)
option(BUILD_TORCH "Build Torch" OFF)
option(ATEN_NO_TEST "Do not build ATen test binaries" OFF)
option(BUILD_ATEN_MOBILE "Build ATen for Android and iOS" OFF)
option(BUILD_BINARY "Build C++ binaries" ON)
option(BUILD_BINARY "Build C++ binaries" OFF)
option(BUILD_DOCS "Build Caffe2 documentation" OFF)
option(BUILD_CUSTOM_PROTOBUF "Build and use Caffe2's own protobuf under third_party" ON)
option(BUILD_PYTHON "Build Python binaries" ON)
Expand Down Expand Up @@ -115,7 +115,7 @@ option(USE_IDEEP "Use IDEEP interface in MKL BLAS" ON)
option(USE_MKLML "Use MKLML interface in MKL BLAS" ON)
option(USE_DISTRIBUTED "Use distributed" ON)
cmake_dependent_option(
USE_MPI "Use MPI. Only available if USE_DISTRIBUTED is on." ON
USE_MPI "Use MPI for Caffe2. Only available if USE_DISTRIBUTED is on." OFF
"USE_DISTRIBUTED" OFF)
cmake_dependent_option(
USE_GLOO "Use Gloo. Only available if USE_DISTRIBUTED is on." ON
Expand Down
22 changes: 18 additions & 4 deletions aten/src/ATen/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -107,19 +107,33 @@ bool Context::setFlushDenormal(bool on) {
#endif
}

Type& getMaybeVariableType(TensorOptions options) {
return globalContext().getMaybeVariableType(
Type& getType(TensorOptions options) {
return globalContext().getType(
options.backend(), options.dtype(), options.is_variable());
}

Type& getMaybeVariableType(const TensorImpl* impl) {
Type& getType(const TensorImpl* impl) {
Backend backend = tensorTypeIdToBackend(impl->type_id());
return globalContext().getMaybeVariableType(
return globalContext().getType(
backend, impl->scalar_type(), impl->is_variable());
}

Allocator* getCPUAllocator() {
return getTHDefaultAllocator();
}

struct LegacyTypeInit : public LegacyTypeInitInterface {
LegacyTypeInit(LegacyTypeInitArgs) {}
void initCPU() const override {
globalContext();
}
void initCUDA() const override {
globalContext().lazyInitCUDA();
}
void initComplex() const override {
globalContext().lazyInitComplex();
}
};
REGISTER_LEGACY_TYPE_INIT(LegacyTypeInit);

}
54 changes: 15 additions & 39 deletions aten/src/ATen/Context.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,9 @@
#include "ATen/Utils.h"
#include "ATen/core/Error.h"
#include "ATen/detail/CUDAHooksInterface.h"
#include "ATen/detail/VariableHooksInterface.h"
#include "ATen/core/VariableHooksInterface.h"
#include "ATen/detail/ComplexHooksInterface.h"
#include "ATen/core/LegacyTypeDispatch.h"

// This is temporary
#include "ATen/core/ATenCoreTest.h"
Expand All @@ -24,43 +25,25 @@ class AT_API Context {
public:
Context();
Type* getNonVariableTypeRaw(Backend p, ScalarType s) {
return type_registry[static_cast<int>(p)][static_cast<int>(s)].get();
return globalLegacyTypeDispatch().getNonVariableTypeRaw(p, s);
}
Type * getNonVariableTypeOpt(Backend p, ScalarType s) {
if (p != Backend::Undefined) {
initCUDAIfNeeded(backendToDeviceType(p));
initComplexIfNeeded(s);
}
auto type = getNonVariableTypeRaw(p, s);

if(!type) {
// there is only a single Undefined Type.
if (p == Backend::Undefined || s == ScalarType::Undefined) {
return getNonVariableTypeRaw(Backend::Undefined, ScalarType::Undefined);
}
}

return type;
return globalLegacyTypeDispatch().getNonVariableTypeOpt(p, s);
}
Type & getNonVariableType(Backend p, ScalarType s) {
auto* type = getNonVariableTypeOpt(p, s);
if (!type) AT_ERROR(toString(p), toString(s), "Type is not enabled.");
return *type;
return globalLegacyTypeDispatch().getNonVariableType(p, s);
}
Type & getVariableType(Backend p, ScalarType s) {
auto& baseType = getNonVariableType(p, s);
return detail::getVariableHooks().getVariableTypeFromBaseType(baseType);
}
Type & getMaybeVariableType(Backend p, ScalarType s, bool is_variable) {
if (is_variable) {
return getVariableType(p, s);
} else {
return getNonVariableType(p, s);
}
return globalLegacyTypeDispatch().getVariableType(p, s);
}
Type & getType(Backend p, ScalarType s, bool is_variable) {
return globalLegacyTypeDispatch().getType(p, s, is_variable);
}
// The passed in Type must be delete'able
// TODO: Just make it take a unique_ptr
void registerType(Backend b, ScalarType s, Type* t) {
type_registry[static_cast<int>(b)][static_cast<int>(s)].reset(t);
detail::getVariableHooks().registerVariableTypeFor(this, b, s);
globalLegacyTypeDispatch().registerType(b, s,
LegacyTypeDispatch::TypeUniquePtr{t, LegacyTypeDeleter([](Type* p) { delete p; }) });
}

Generator & defaultGenerator(DeviceType device_type) {
Expand Down Expand Up @@ -127,11 +110,6 @@ class AT_API Context {
std::unique_ptr<Generator>
generator_registry[static_cast<int>(DeviceType::COMPILE_TIME_MAX_DEVICE_TYPES)];
private:
// NB: type_registry has nullptr for all CUDA backends until
// CUDA initialization has occurred
std::unique_ptr<Type> type_registry
[static_cast<int>(Backend::NumOptions)]
[static_cast<int>(ScalarType::NumOptions)];
void initCUDAIfNeeded(DeviceType p) {
if (p == DeviceType::CUDA) {
lazyInitCUDA();
Expand All @@ -150,8 +128,6 @@ class AT_API Context {
std::atomic<size_t> next_id;
std::unique_ptr<THCState, void(*)(THCState*)> thc_state;
friend struct Type;
friend void register_cpu_types(Context * context);
friend void register_cuda_types(Context * context);
};

AT_API Context & globalContext();
Expand All @@ -174,8 +150,8 @@ static inline Type& getNonVariableType(DeviceType p, ScalarType s) {
return globalContext().getNonVariableType(deviceTypeToBackend(p), s);
}

AT_API Type& getMaybeVariableType(TensorOptions options);
AT_API Type& getMaybeVariableType(const TensorImpl*);
AT_API Type& getType(TensorOptions options);
AT_API Type& getType(const TensorImpl*);

AT_API Allocator* getCPUAllocator();

Expand Down
Loading