Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
7 changes: 0 additions & 7 deletions test/cpp/fluid/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,6 @@ endif()

set(COMMON_OP_DEPS ${COMMON_OP_DEPS} executor)

# TODO(lijin23): fix bugs in KL3
# if(WITH_XPU)
# paddle_test(beam_search_decode_op_xpu_test SRCS
# beam_search_decode_op_xpu_test.cc)
# set(COMMON_OP_DEPS ${COMMON_OP_DEPS} xpulib)
# endif()

nv_test(
test_common_infer_shape_functions
SRCS test_common_infer_shape_functions.cc
Expand Down
2 changes: 2 additions & 0 deletions test/xpu/cpp/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
paddle_test(enforce_xpu_test SRCS enforce_xpu_test.cc)
paddle_test(overload_xpu_alloc_test SRCS overload_xpu_alloc_test.cc)
paddle_test(beam_search_decode_op_xpu_test SRCS
beam_search_decode_op_xpu_test.cc)
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ See the License for the specific language governing permissions and
limitations under the License. */

#include "paddle/fluid/operators/beam_search_decode_op_xpu.h"
#include "paddle/phi/backends/xpu/xpu_info.h"

#include "gtest/gtest.h"

Expand Down Expand Up @@ -53,11 +54,7 @@ void GenerateXPUExample(const std::vector<size_t>& level_0,
data.size()));

CPUPlace place;
int XPU_PlaceNo = 0;
if (std::getenv("FLAGS_selected_xpus") != nullptr)
XPU_PlaceNo = atoi(std::getenv("FLAGS_selected_xpus"));
else if (std::getenv("XPU_VISIBLE_DEVICES") != nullptr)
XPU_PlaceNo = atoi(std::getenv("XPU_VISIBLE_DEVICES"));
int XPU_PlaceNo = phi::backends::xpu::GetXPUCurrentDeviceId();

XPUPlace xpu_place(XPU_PlaceNo);

Expand Down
4 changes: 1 addition & 3 deletions test/xpu/test_collective_process_group_xpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,7 @@
class TestProcessGroup(TestMultipleXpus):
# TODO(lijin23): fix bugs in KL3 CI
@unittest.skipIf(
not core.is_compiled_with_xpu()
or paddle.device.xpu.device_count() < 2
or core.get_xpu_device_version(0) == core.XPUVersion.XPU3,
not core.is_compiled_with_xpu() or paddle.device.xpu.device_count() < 2,
"run test when having at least 2 XPUs.",
)
def test_process_group_bkcl(self):
Expand Down
8 changes: 2 additions & 6 deletions test/xpu/test_collective_reduce_xpu.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,7 @@ def _setup_config(self):

# TODO(lijin23): fix bugs in KL3
@unittest.skipIf(
not core.is_compiled_with_xpu()
or paddle.device.xpu.device_count() < 2
or core.get_xpu_device_version(0) == core.XPUVersion.XPU3,
not core.is_compiled_with_xpu() or paddle.device.xpu.device_count() < 2,
"run test when having at least 2 XPUs.",
)
def test_reduce(self):
Expand All @@ -44,9 +42,7 @@ def test_reduce(self):
)

@unittest.skipIf(
not core.is_compiled_with_xpu()
or paddle.device.xpu.device_count() < 2
or core.get_xpu_device_version(0) == core.XPUVersion.XPU3,
not core.is_compiled_with_xpu() or paddle.device.xpu.device_count() < 2,
"run test when having at least 2 XPUs.",
)
def test_reduce_dygraph(self):
Expand Down