diff --git a/diopirt b/diopirt index 67685af..b1c1e40 160000 --- a/diopirt +++ b/diopirt @@ -1 +1 @@ -Subproject commit 67685af6f663ecb5ef0ce08976efb1c062f49fc8 +Subproject commit b1c1e40c4ae87511669e24ce5581dd9c2e6d4b04 diff --git a/impl b/impl index 6d198d8..6fa4153 160000 --- a/impl +++ b/impl @@ -1 +1 @@ -Subproject commit 6d198d8b92c283c9c99f7c2134e28a8feb76ab87 +Subproject commit 6fa415374d405065ed2e739e663b2d0e341aae48 diff --git a/python/conformance/diopi_configs.py b/python/conformance/diopi_configs.py index e733c2a..906815b 100644 --- a/python/conformance/diopi_configs.py +++ b/python/conformance/diopi_configs.py @@ -4092,4 +4092,22 @@ ), ), + 'normalize': dict( + name=["normalize"], + para=dict( + p=[2.0, 1.0, 0, 1.5], + dim=[1, 2, -1, 0], + eps=[1e-12, 1e-12, 1e-11, 1e-12], + ), + tensor_para=dict( + args=[ + { + "ins": ['input'], + "shape": ((256, 256, 3, 3), (256, 128, 1, 1), (64, 32, 16), (32, 8)), + "dtype": [Dtype.float32, Dtype.float64], + } + ] + ) + ), + } diff --git a/python/conformance/diopi_functions.py b/python/conformance/diopi_functions.py index f59487c..1a89cf9 100644 --- a/python/conformance/diopi_functions.py +++ b/python/conformance/diopi_functions.py @@ -3432,3 +3432,12 @@ def normal(mean, std, size=None): ret = func(out.context_handle, out.tensor_handle, arg_mean, arg_std) check_returncode(ret) return out + + +def normalize(input, p, dim, eps): + call = "diopiNormalize" + func = check_function(call) + out = raw_like(input) + ret = func(input.context_handle, out.tensor_handle, input.tensor_handle, c_double(p), c_int64(dim), c_double(eps)) + check_returncode(ret) + return out