Skip to content

Commit dc22ba8

Browse files
committed
Fix
1 parent c635623 commit dc22ba8

File tree

10 files changed

+3906
-16
lines changed

10 files changed

+3906
-16
lines changed

.pre-commit-config.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,8 +90,8 @@ repos:
9090
rev: v0.6.13
9191
hooks:
9292
- id: cmake-format
93-
- repo: https://github.com/cmake-lint/cmake-lint
94-
rev: 1.4.2
93+
- repo: https://github.com/PFCCLab/cmake-lint-paddle
94+
rev: v1.5.1
9595
hooks:
9696
- id: cmakelint
9797
args: [--config=./tools/codestyle/.cmakelintrc]

backends/custom_cpu/tests/unittests/test_argsort_op.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ def forward(self):
7070

7171

7272
def create_tensor(np_data, place):
73-
tensor = core.LoDTensor()
73+
tensor = core.DenseTensor()
7474
tensor.set(np_data, place)
7575
return tensor
7676

backends/custom_cpu/tests/unittests/test_slice_op.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ def test_case_1(self):
582582
main_program = base.Program()
583583
self.set_program_and_run(main_program, 1)
584584

585-
self.assertTrue(self.sliced_arr.type == core.VarDesc.VarType.LOD_TENSOR)
585+
self.assertTrue(self.sliced_arr.type == core.VarDesc.VarType.DENSE_TENSOR)
586586
self.assertEqual(self.sliced_arr.shape, self.shape)
587587
self.assertTrue(np.array_equal(self.out, self.data))
588588
self.assertTrue(np.array_equal(self.g_x0, np.ones_like(self.data)))
@@ -593,7 +593,7 @@ def test_case_2(self):
593593
main_program = base.Program()
594594
self.set_program_and_run(main_program, 2)
595595

596-
self.assertTrue(self.sliced_arr.type == core.VarDesc.VarType.LOD_TENSOR_ARRAY)
596+
self.assertTrue(self.sliced_arr.type == core.VarDesc.VarType.DENSE_TENSOR_ARRAY)
597597
self.assertEqual(self.sliced_arr.shape, self.shape)
598598
self.assertTrue(
599599
np.array_equal(self.out, np.stack([self.data, self.data], axis=self.axis))
@@ -606,7 +606,7 @@ def test_case_3(self):
606606
main_program = base.Program()
607607
self.set_program_and_run(main_program, 3)
608608

609-
self.assertTrue(self.sliced_arr.type == core.VarDesc.VarType.LOD_TENSOR_ARRAY)
609+
self.assertTrue(self.sliced_arr.type == core.VarDesc.VarType.DENSE_TENSOR_ARRAY)
610610
self.assertEqual(self.sliced_arr.shape, self.shape)
611611
self.assertTrue(
612612
np.array_equal(

backends/gcu/tests/unittests_legacy/test_argsort_op_gcu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -181,7 +181,7 @@ def forward(self):
181181

182182

183183
def create_tensor(np_data, place):
184-
tensor = core.LoDTensor()
184+
tensor = core.DenseTensor()
185185
tensor.set(np_data, place)
186186
return tensor
187187

backends/intel_gpu/tests/unittests/test_argsort_op.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ def forward(self):
6969

7070

7171
def create_tensor(np_data, place):
72-
tensor = core.LoDTensor()
72+
tensor = core.DenseTensor()
7373
tensor.set(np_data, place)
7474
return tensor
7575

backends/intel_gpu/tests/unittests/test_slice_op.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -582,7 +582,7 @@ def test_slice_api(self):
582582
# main_program = base.Program()
583583
# self.set_program_and_run(main_program, 1)
584584

585-
# self.assertTrue(self.sliced_arr.type == core.VarDesc.VarType.LOD_TENSOR)
585+
# self.assertTrue(self.sliced_arr.type == core.VarDesc.VarType.DENSE_TENSOR)
586586
# self.assertEqual(self.sliced_arr.shape, self.shape)
587587
# self.assertTrue(np.array_equal(self.out, self.data))
588588
# self.assertTrue(np.array_equal(self.g_x0, np.ones_like(self.data)))
@@ -594,7 +594,7 @@ def test_slice_api(self):
594594
# self.set_program_and_run(main_program, 2)
595595

596596
# self.assertTrue(
597-
# self.sliced_arr.type == core.VarDesc.VarType.LOD_TENSOR_ARRAY)
597+
# self.sliced_arr.type == core.VarDesc.VarType.DENSE_TENSOR_ARRAY)
598598
# self.assertEqual(self.sliced_arr.shape, self.shape)
599599
# self.assertTrue(
600600
# np.array_equal(
@@ -609,7 +609,7 @@ def test_slice_api(self):
609609
# self.set_program_and_run(main_program, 3)
610610

611611
# self.assertTrue(
612-
# self.sliced_arr.type == core.VarDesc.VarType.LOD_TENSOR_ARRAY)
612+
# self.sliced_arr.type == core.VarDesc.VarType.DENSE_TENSOR_ARRAY)
613613
# self.assertEqual(self.sliced_arr.shape, self.shape)
614614
# self.assertTrue(
615615
# np.array_equal(

backends/npu/tests/unittests/test_slice_op_npu.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ def test_case_1(self):
666666
main_program = base.Program()
667667
self.set_program_and_run(main_program, 1)
668668

669-
self.assertTrue(self.sliced_arr.type == core.VarDesc.VarType.LOD_TENSOR)
669+
self.assertTrue(self.sliced_arr.type == core.VarDesc.VarType.DENSE_TENSOR)
670670
self.assertEqual(self.sliced_arr.shape, self.shape)
671671
np.testing.assert_array_equal(self.out, self.data)
672672
np.testing.assert_array_equal(self.g_x0, np.ones_like(self.data))
@@ -677,7 +677,7 @@ def test_case_2(self):
677677
main_program = base.Program()
678678
self.set_program_and_run(main_program, 2)
679679

680-
self.assertTrue(self.sliced_arr.type == core.VarDesc.VarType.LOD_TENSOR_ARRAY)
680+
self.assertTrue(self.sliced_arr.type == core.VarDesc.VarType.DENSE_TENSOR_ARRAY)
681681
self.assertEqual(self.sliced_arr.shape, self.shape)
682682
np.testing.assert_array_equal(
683683
self.out, np.stack([self.data, self.data], axis=self.axis)
@@ -690,7 +690,7 @@ def test_case_3(self):
690690
main_program = base.Program()
691691
self.set_program_and_run(main_program, 3)
692692

693-
self.assertTrue(self.sliced_arr.type == core.VarDesc.VarType.LOD_TENSOR_ARRAY)
693+
self.assertTrue(self.sliced_arr.type == core.VarDesc.VarType.DENSE_TENSOR_ARRAY)
694694
self.assertEqual(self.sliced_arr.shape, self.shape)
695695
np.testing.assert_array_equal(
696696
self.out,

backends/npu/tests/unittests/test_strided_slice_op_npu.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -689,7 +689,7 @@ def test_dygraph_op(self):
689689

690690
# numeric_output = [self.data, self.data]
691691
# self.assertTrue(
692-
# self.sliced_arr.type == base.core.VarDesc.VarType.LOD_TENSOR_ARRAY
692+
# self.sliced_arr.type == base.core.VarDesc.VarType.DENSE_TENSOR_ARRAY
693693
# )
694694
# np.testing.assert_array_equal(self.out, numeric_output)
695695
# np.testing.assert_array_equal(self.g_x0, np.zeros_like(self.data))

python/tests/op_test.py

Lines changed: 0 additions & 1 deletion
This file was deleted.

0 commit comments

Comments
 (0)