Skip to content

Commit c404084

Browse files
committed
Fix Eigen macro when using GPU
test=release/1.2
1 parent c5909c7 commit c404084

Some content is hidden

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

46 files changed

+2
-96
lines changed

cmake/configure.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ endif(NOT WITH_GOLANG)
8686

8787
if(WITH_GPU)
8888
add_definitions(-DPADDLE_WITH_CUDA)
89+
add_definitions(-DEIGEN_USE_GPU)
8990

9091
FIND_PACKAGE(CUDA REQUIRED)
9192

paddle/fluid/operators/bilinear_tensor_product_op.cu

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
1414

15-
#define EIGEN_USE_GPU
1615
#include "paddle/fluid/operators/bilinear_tensor_product_op.h"
1716

1817
namespace ops = paddle::operators;

paddle/fluid/operators/cos_sim_op.cu

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ distributed under the License is distributed on an "AS IS" BASIS,
1111
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
14-
15-
#define EIGEN_USE_GPU
1614
#include "paddle/fluid/operators/cos_sim_op.h"
1715

1816
namespace ops = paddle::operators;

paddle/fluid/operators/crop_op.cu

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ distributed under the License is distributed on an "AS IS" BASIS,
1111
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
14-
15-
#define EIGEN_USE_GPU
1614
#include "paddle/fluid/operators/crop_op.h"
1715

1816
namespace ops = paddle::operators;

paddle/fluid/operators/dropout_op.cu

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ distributed under the License is distributed on an "AS IS" BASIS,
1111
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
14-
15-
#define EIGEN_USE_GPU
1614
#include <thrust/device_ptr.h>
1715
#include <thrust/iterator/counting_iterator.h>
1816
#include <thrust/random.h>

paddle/fluid/operators/elementwise/elementwise_add_op.cu

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ distributed under the License is distributed on an "AS IS" BASIS,
1111
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
14-
15-
#define EIGEN_USE_GPU
1614
#include "paddle/fluid/operators/elementwise/elementwise_add_op.h"
1715
#include "paddle/fluid/platform/float16.h"
1816

paddle/fluid/operators/elementwise/elementwise_div_op.cu

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ distributed under the License is distributed on an "AS IS" BASIS,
1111
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
14-
15-
#define EIGEN_USE_GPU
1614
#include "paddle/fluid/operators/elementwise/elementwise_div_op.h"
1715

1816
namespace ops = paddle::operators;

paddle/fluid/operators/elementwise/elementwise_max_op.cu

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ distributed under the License is distributed on an "AS IS" BASIS,
1111
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
14-
15-
#define EIGEN_USE_GPU
1614
#include "paddle/fluid/operators/elementwise/elementwise_max_op.h"
1715

1816
namespace ops = paddle::operators;

paddle/fluid/operators/elementwise/elementwise_min_op.cu

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ distributed under the License is distributed on an "AS IS" BASIS,
1111
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
14-
15-
#define EIGEN_USE_GPU
1614
#include "paddle/fluid/operators/elementwise/elementwise_min_op.h"
1715

1816
namespace ops = paddle::operators;

paddle/fluid/operators/elementwise/elementwise_mul_op.cu

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@ distributed under the License is distributed on an "AS IS" BASIS,
1111
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1212
See the License for the specific language governing permissions and
1313
limitations under the License. */
14-
15-
#define EIGEN_USE_GPU
1614
#include "paddle/fluid/operators/elementwise/elementwise_mul_op.h"
1715

1816
namespace ops = paddle::operators;

0 commit comments

Comments
 (0)