Skip to content
This repository was archived by the owner on Jun 8, 2023. It is now read-only.
Open
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
2 changes: 1 addition & 1 deletion diopirt
2 changes: 1 addition & 1 deletion impl
Submodule impl updated from 6d198d to 6fa415
18 changes: 18 additions & 0 deletions python/conformance/diopi_configs.py
Original file line number Diff line number Diff line change
Expand Up @@ -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],
}
]
)
),

}
9 changes: 9 additions & 0 deletions python/conformance/diopi_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -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