|
1 | 1 | /*******************************************************************************
|
2 |
| -* Copyright 2020-2022 Intel Corporation |
| 2 | +* Copyright 2020-2025 Intel Corporation |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
46 | 46 |
|
47 | 47 | using namespace dnnl;
|
48 | 48 |
|
49 |
| -using tag = memory::format_tag; |
50 |
| -using dt = memory::data_type; |
51 |
| - |
52 | 49 | void bnorm_u8_via_binary_postops(dnnl::engine::kind engine_kind) {
|
53 | 50 |
|
54 | 51 | // Create execution dnnl::engine.
|
@@ -102,12 +99,18 @@ void bnorm_u8_via_binary_postops(dnnl::engine::kind engine_kind) {
|
102 | 99 | oscale_data.begin(), oscale_data.end(), []() { return 0.5f; });
|
103 | 100 |
|
104 | 101 | // Create descriptors.
|
105 |
| - auto src_md = memory::desc(src_dims, dt::u8, tag::nhwc); |
106 |
| - auto mean_md = memory::desc(params_dims, dt::f32, tag::nhwc); |
107 |
| - auto variance_md = memory::desc(params_dims, dt::f32, tag::nhwc); |
108 |
| - auto scale_md = memory::desc(params_dims, dt::f32, tag::nhwc); |
109 |
| - auto shift_md = memory::desc(params_dims, dt::f32, tag::nhwc); |
110 |
| - auto oscale_md = memory::desc(params_dims, dt::f32, tag::nhwc); |
| 102 | + auto src_md = memory::desc( |
| 103 | + src_dims, memory::data_type::u8, memory::format_tag::nhwc); |
| 104 | + auto mean_md = memory::desc( |
| 105 | + params_dims, memory::data_type::f32, memory::format_tag::nhwc); |
| 106 | + auto variance_md = memory::desc( |
| 107 | + params_dims, memory::data_type::f32, memory::format_tag::nhwc); |
| 108 | + auto scale_md = memory::desc( |
| 109 | + params_dims, memory::data_type::f32, memory::format_tag::nhwc); |
| 110 | + auto shift_md = memory::desc( |
| 111 | + params_dims, memory::data_type::f32, memory::format_tag::nhwc); |
| 112 | + auto oscale_md = memory::desc( |
| 113 | + params_dims, memory::data_type::f32, memory::format_tag::nhwc); |
111 | 114 |
|
112 | 115 | // Create src memory objects.
|
113 | 116 | auto src_mem = memory(src_md, engine);
|
|
0 commit comments