You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jun 8, 2023. It is now read-only.
defconvert_input_tensors(function_paras: dict, test_tag: list, nhwc_list=[], dtype_list=[], filter_dtype_str_list=[]):
...
ifisinstance(function_paras['kwargs'][para], np.ndarray):
... # do filter_dtype_str_list check:iffilter_dtype_str_listandstr(tensor.dtype) infilter_dtype_str_list:
raiseDiopiException(f"Skipped: {tensor.dtype} Tensor skipped for test")
..
ifpara=="tensors":
...
# there ,did not.
Maybe need fix like this:
diff --git a/python/conformance/conformance_test.py b/python/conformance/conformance_test.py
index 1ccaf23..d2015ca 100644
--- a/python/conformance/conformance_test.py
+++ b/python/conformance/conformance_test.py
@@ -52,6 +52,8 @@ def convert_input_tensors(function_paras: dict, test_tag: list, nhwc_list=[], dt
if para == "tensors":
tensors = function_paras['kwargs'][para]
foridx, elein enumerate(tensors):
+ if filter_dtype_str_list and str(ele.dtype) in filter_dtype_str_list:
+ raise DiopiException(f"Skipped: {ele.dtype} Tensor skipped for test")
tensors[idx] = Tensor.from_numpy(ele)
if ele is not None and str(ele.dtype) not in test_tag:
test_tag.append(str(ele.dtype))
In
python/conformance/conformance_test.py:Maybe need fix like this:
diff --git a/python/conformance/conformance_test.py b/python/conformance/conformance_test.py index 1ccaf23..d2015ca 100644 --- a/python/conformance/conformance_test.py +++ b/python/conformance/conformance_test.py @@ -52,6 +52,8 @@ def convert_input_tensors(function_paras: dict, test_tag: list, nhwc_list=[], dt if para == "tensors": tensors = function_paras['kwargs'][para] for idx, ele in enumerate(tensors): + if filter_dtype_str_list and str(ele.dtype) in filter_dtype_str_list: + raise DiopiException(f"Skipped: {ele.dtype} Tensor skipped for test") tensors[idx] = Tensor.from_numpy(ele) if ele is not None and str(ele.dtype) not in test_tag: test_tag.append(str(ele.dtype))