Skip to content

Commit

Permalink
Merge branch 'caffe2_ops_miopen' of github.com:petrex/pytorch into ca…
Browse files Browse the repository at this point in the history
…ffe2_ops_miopen

* 'caffe2_ops_miopen' of github.com:petrex/pytorch:
  Support printing sparse tensors in ATen, fixes pytorch#8333. (pytorch#8334)
  Skip test_multinomial_invalid_probs_cuda on Windows (pytorch#8324)
  Fix the script doesn't stop eariler on error for MSVC and Ninja (pytorch#8277)
  Fix collect_env.py for Windows (pytorch#8326)
  add error when backend is not supported by DDP (pytorch#8325)
  Add docstring for `torch.sparse_coo_tensor` (pytorch#8152)
  [THD] fix broken THD build with NCCL (pytorch#8323)
  [auto] Update onnx to 4b4085c - Add missing warning ignoring flags to onnx_proto CMake target (onnx/onnx#1105) onnx/onnx@4b4085c
  Fix sample code for cuda stream (pytorch#8319)
  [auto] Update onnx to 5ed684e - Remove/replace /MX with /WX for MSVC build. Was typo in a previous ch… (onnx/onnx#1104) onnx/onnx@5ed684e
  Small fixes (pytorch#8296)
  Remove unused grad ops on mobile to reduce app size (pytorch#8297)
  Clean up old sccache log before build (pytorch#8305)
  Replace Variables to Tensors (pytorch#8309)
  Removes unused THCTensorConv (pytorch#8229)
  • Loading branch information
petrex committed Jun 11, 2018
2 parents 46a09d6 + dfa2447 commit e1ac5e7
Show file tree
Hide file tree
Showing 29 changed files with 189 additions and 1,021 deletions.
1 change: 1 addition & 0 deletions .jenkins/pytorch/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ trap_add cleanup EXIT
if which sccache > /dev/null; then
# Save sccache logs to file
sccache --stop-server || true
rm ~/sccache_error.log || true
SCCACHE_ERROR_LOG=~/sccache_error.log RUST_LOG=sccache::server=error sccache --start-server

# Report sccache stats for easier debugging
Expand Down
5 changes: 3 additions & 2 deletions .jenkins/pytorch/win-build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ mkdir %CD%\\tmp_bin
if "%REBUILD%"=="" (
:check_sccache
%CD%\\tmp_bin\\sccache.exe --show-stats || (
taskkill /im sccache.exe /f /t || set ERRORLEVEL=0
taskkill /im sccache.exe /f /t || ver > nul
del %CD%\\tmp_bin\\sccache.exe
aws s3 cp s3://ossci-windows/sccache.exe %CD%\\tmp_bin\\sccache.exe
goto :check_sccache
Expand Down Expand Up @@ -95,7 +95,8 @@ if "%REBUILD%"=="" (
set NO_CUDA=1
python setup.py install
)
if %errorlevel% neq 0 exit /b %errorlevel%
if errorlevel 1 exit /b 1
if not errorlevel 0 exit /b 1
if "%REBUILD%"=="" (
sccache --show-stats
sccache --zero-stats
Expand Down
6 changes: 6 additions & 0 deletions aten/src/ATen/Formatting.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,12 @@ std::ostream& print(std::ostream& stream, const Tensor & tensor_, int64_t linesi
FormatGuard guard(stream);
if(!tensor_.defined()) {
stream << "[ Tensor (undefined) ]";
} else if (tensor_.is_sparse()) {
stream << "[ " << tensor_.pImpl->toString() << "{}\n";
stream << "indices:\n" << tensor_._indices() << "\n";
stream << "values:\n" << tensor_._values() << "\n";
stream << "size:\n" << tensor_.sizes() << "\n";
stream << "]";
} else {
Type& cpudouble = tensor_.type().toBackend(kCPU).toScalarType(kDouble);
Tensor tensor = tensor_.toType(cpudouble).contiguous();
Expand Down
2 changes: 0 additions & 2 deletions aten/src/THC/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ set(ATen_CUDA_SRCS ${ATen_CUDA_SRCS}
${CMAKE_CURRENT_SOURCE_DIR}/THCTensorMathReduce.cu
${CMAKE_CURRENT_SOURCE_DIR}/THCTensorMathScan.cu
${CMAKE_CURRENT_SOURCE_DIR}/THCTensorIndex.cu
${CMAKE_CURRENT_SOURCE_DIR}/THCTensorConv.cu
${CMAKE_CURRENT_SOURCE_DIR}/THCTensorRandom.cu
${CMAKE_CURRENT_SOURCE_DIR}/THCTensorScatterGather.cu
${CMAKE_CURRENT_SOURCE_DIR}/THCTensorTopK.cu
Expand All @@ -71,7 +70,6 @@ INSTALL(FILES
THCTensorCopy.hpp
THCTensorRandom.h
THCTensorMath.h
THCTensorConv.h
THCApply.cuh
THCReduce.cuh
THCReduceAll.cuh
Expand Down
1 change: 0 additions & 1 deletion aten/src/THC/THC.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,5 @@
#include "THCTensorCopy.h"
#include "THCTensorRandom.h"
#include "THCTensorMath.h"
#include "THCTensorConv.h"

#endif
Loading

0 comments on commit e1ac5e7

Please sign in to comment.