Skip to content

Commit

Permalink
Revert "Parallelize TensorMethods.cpp builds (pytorch#1364)" (pytorch…
Browse files Browse the repository at this point in the history
…#1390)

This reverts commit 060048b.
  • Loading branch information
soumith authored Apr 28, 2017
1 parent 060048b commit 24e5a90
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 71 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ torch/csrc/nn/THCUNN.cpp
torch/csrc/nn/THNN_generic.cwrap
torch/csrc/nn/THNN_generic.cpp
torch/csrc/nn/THNN_generic.h
torch/csrc/generated
docs/src/**/*
test/data/legacy_modules.t7
test/data/gpu_tensors.pt
Expand Down
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from tools.setup_helpers.env import check_env_flag
from tools.setup_helpers.cuda import WITH_CUDA, CUDA_HOME
from tools.setup_helpers.cudnn import WITH_CUDNN, CUDNN_LIB_DIR, CUDNN_INCLUDE_DIR
from tools.setup_helpers.split_types import split_types
DEBUG = check_env_flag('DEBUG')
WITH_DISTRIBUTED = check_env_flag('WITH_DISTRIBUTED')
WITH_DISTRIBUTED_MW = WITH_DISTRIBUTED and check_env_flag('WITH_DISTRIBUTED_MW')
Expand Down Expand Up @@ -260,6 +259,7 @@ def run(self):
"torch/csrc/Generator.cpp",
"torch/csrc/Size.cpp",
"torch/csrc/Exceptions.cpp",
"torch/csrc/Tensor.cpp",
"torch/csrc/Storage.cpp",
"torch/csrc/DynamicTypes.cpp",
"torch/csrc/byte_order.cpp",
Expand All @@ -282,7 +282,6 @@ def run(self):
"torch/csrc/autograd/functions/convolution.cpp",
"torch/csrc/autograd/functions/init.cpp",
"torch/csrc/nn/THNN_generic.cpp",
*split_types("torch/csrc/Tensor.cpp")
]

try:
Expand Down Expand Up @@ -326,10 +325,10 @@ def run(self):
"torch/csrc/cuda/Module.cpp",
"torch/csrc/cuda/Storage.cpp",
"torch/csrc/cuda/Stream.cpp",
"torch/csrc/cuda/Tensor.cpp",
"torch/csrc/cuda/AutoGPU.cpp",
"torch/csrc/cuda/utils.cpp",
"torch/csrc/cuda/serialization.cpp",
*split_types("torch/csrc/cuda/Tensor.cpp"),
]

if WITH_NCCL:
Expand Down
57 changes: 0 additions & 57 deletions tools/setup_helpers/split_types.py

This file was deleted.

12 changes: 8 additions & 4 deletions torch/csrc/Tensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,12 @@
#include <tuple>
#include <TH/THMath.h>

#include "torch/csrc/THP.h"
#include "torch/csrc/copy_utils.h"
#include "torch/csrc/DynamicTypes.h"
#include "THP.h"
#include "copy_utils.h"
#include "DynamicTypes.h"

//generic_include TH torch/csrc/generic/Tensor.cpp
#include "generic/Tensor.cpp"
#include <TH/THGenerateAllTypes.h>

#include "generic/Tensor.cpp"
#include <TH/THGenerateHalfType.h>
11 changes: 6 additions & 5 deletions torch/csrc/cuda/Tensor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6,13 +6,14 @@
#include <vector>
#include <stack>
#include <tuple>
#include "torch/csrc/cuda/THCP.h"
#include "THCP.h"

#include "torch/csrc/cuda/override_macros.h"
#include "override_macros.h"
#include "torch/csrc/copy_utils.h"
#include "DynamicTypes.h"

//generic_include THC torch/csrc/generic/Tensor.cpp
#define THC_GENERIC_FILE "torch/csrc/generic/Tensor.cpp"
#include <THC/THCGenerateAllTypes.h>

#include "torch/csrc/cuda/undef_macros.h"
#include "torch/csrc/cuda/restore_macros.h"
#include "undef_macros.h"
#include "restore_macros.h"
3 changes: 2 additions & 1 deletion torch/csrc/generic/methods/TensorMath.cwrap
Original file line number Diff line number Diff line change
Expand Up @@ -1625,7 +1625,8 @@
- THTensor* tensor2
]]

#if defined(TH_REAL_IS_FLOAT) || defined(TH_REAL_IS_DOUBLE) || CUDA_FLOAT || CUDA_DOUBLE
#ifndef THP_LAPACK_CONSTANTS
#define THP_LAPACK_CONSTANTS
// We need to pass pointers to chars to tensor lapack functions...
static const char __U = 'U';
static const char __L = 'L';
Expand Down

0 comments on commit 24e5a90

Please sign in to comment.