Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 6 additions & 23 deletions test/legacy_test/test_index_put_op.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
# limitations under the License.

import copy
import os
import unittest

import numpy as np
Expand Down Expand Up @@ -121,17 +120,9 @@ def init_dtype_type(self):
self.accumulate = False

def setPlace(self):
self.place = []
if (
os.environ.get('FLAGS_CI_both_cpu_and_gpu', 'False').lower()
in ['1', 'true', 'on']
or not paddle.is_compiled_with_cuda()
):
self.place.append('cpu')
if self.dtype_np is np.float16:
self.place = []
if paddle.is_compiled_with_cuda():
self.place.append('gpu')
self.place = get_places(string_format=True)
if self.dtype_np is np.float16 and "cpu" in self.place:
self.place.remove("cpu")

def test_dygraph_forward(self):
paddle.disable_static()
Expand Down Expand Up @@ -1028,17 +1019,9 @@ def init_dtype_type(self):
self.index_type_pd = paddle.int64

def setPlace(self):
self.place = []
if (
os.environ.get('FLAGS_CI_both_cpu_and_gpu', 'False').lower()
in ['1', 'true', 'on']
or not paddle.is_compiled_with_cuda()
):
self.place.append('cpu')
if self.dtype_np is np.float16:
self.place = []
if paddle.is_compiled_with_cuda():
self.place.append('gpu')
self.place = get_places(string_format=True)
if self.dtype_np is np.float16 and "cpu" in self.place:
self.place.remove("cpu")

def test_dygraph_forward(self):
paddle.disable_static()
Expand Down
Loading