Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
0xzhang committed Apr 29, 2022
1 parent 9662f48 commit 71e7ffe
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 10 deletions.
18 changes: 9 additions & 9 deletions tests/python/test_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ def _get_expected_matrix_apis():
'wasm', 'x64', 'x86_64', 'zero'
]
user_api[ti.Field] = [
'copy_from', 'dtype', 'fill', 'from_numpy', 'from_torch', 'from_paddle',
'parent', 'shape', 'snode', 'to_numpy', 'to_torch', 'to_paddle'
'copy_from', 'dtype', 'fill', 'from_numpy', 'from_paddle', 'from_torch',
'parent', 'shape', 'snode', 'to_numpy', 'to_paddle', 'to_torch'
]
user_api[ti.FieldsBuilder] = [
'bit_array', 'bit_struct', 'bitmasked', 'deactivate_all', 'dense',
Expand All @@ -77,9 +77,9 @@ def _get_expected_matrix_apis():
]
user_api[ti.Matrix] = _get_expected_matrix_apis()
user_api[ti.MatrixField] = [
'copy_from', 'dtype', 'fill', 'from_numpy', 'from_torch', 'from_paddle',
'get_scalar_field', 'parent', 'shape', 'snode', 'to_numpy', 'to_torch',
'to_paddle'
'copy_from', 'dtype', 'fill', 'from_numpy', 'from_paddle', 'from_torch',
'get_scalar_field', 'parent', 'shape', 'snode', 'to_numpy', 'to_paddle',
'to_torch'
]
user_api[ti.MatrixNdarray] = [
'copy_from', 'element_shape', 'fill', 'from_numpy', 'to_numpy'
Expand All @@ -90,17 +90,17 @@ def _get_expected_matrix_apis():
'dynamic', 'lazy_grad', 'parent', 'place', 'pointer', 'shape'
]
user_api[ti.ScalarField] = [
'copy_from', 'dtype', 'fill', 'from_numpy', 'from_torch', 'from_paddle',
'parent', 'shape', 'snode', 'to_numpy', 'to_torch', 'to_paddle'
'copy_from', 'dtype', 'fill', 'from_numpy', 'from_paddle', 'from_torch',
'parent', 'shape', 'snode', 'to_numpy', 'to_paddle', 'to_torch'
]
user_api[ti.ScalarNdarray] = [
'copy_from', 'element_shape', 'fill', 'from_numpy', 'to_numpy'
]
user_api[ti.Struct] = ['field', 'fill', 'items', 'keys', 'to_dict']
user_api[ti.StructField] = [
'copy_from', 'dtype', 'fill', 'from_numpy', 'from_torch', 'from_paddle',
'copy_from', 'dtype', 'fill', 'from_numpy', 'from_paddle', 'from_torch',
'get_member_field', 'keys', 'parent', 'shape', 'snode', 'to_numpy',
'to_torch', 'to_paddle'
'to_paddle', 'to_torch'
]
user_api[ti.VectorNdarray] = [
'copy_from', 'element_shape', 'fill', 'from_numpy', 'to_numpy'
Expand Down
2 changes: 1 addition & 1 deletion tests/python/test_get_external_tensor_shape.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ def func(x: ti.types.ndarray(), index: ti.template()) -> ti.i32:
@pytest.mark.skipif(not has_paddle(), reason='PaddlePaddle not installed.')
@pytest.mark.parametrize('size', [[1, 2, 3, 4]])
@test_utils.test(exclude=ti.opengl)
def test_get_external_tensor_shape_access_torch(size):
def test_get_external_tensor_shape_access_paddle(size):
@ti.kernel
def func(x: ti.types.ndarray(), index: ti.template()) -> ti.i32:
return x.shape[index]
Expand Down

0 comments on commit 71e7ffe

Please sign in to comment.