Skip to content

Commit aa10d7e

Browse files
committed
Fix some warnings related to stickification for NNPA
Signed-off-by: Tung D. Le <[email protected]>
1 parent 7a7beda commit aa10d7e

File tree

1 file changed

+11
-3
lines changed

1 file changed

+11
-3
lines changed

src/Accelerators/NNPA/Support/Stickify/Stickify.cpp

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,8 @@ DECLARE_DATA_LAYOUT_STR(ZDNN_BIDIR_FICO)
117117
// const char *DATA_FORMAT_STR_X
118118
DECLARE_DATA_FORMAT_STR(ZDNN_FORMAT_4DFEATURE)
119119
DECLARE_DATA_FORMAT_STR(ZDNN_FORMAT_4DKERNEL)
120+
DECLARE_DATA_FORMAT_STR(ZDNN_FORMAT_4DWEIGHTS)
121+
DECLARE_DATA_FORMAT_STR(ZDNN_FORMAT_4DGENERIC)
120122

121123
static short get_data_layout_num_gates(zdnn_data_layouts layout) {
122124

@@ -229,6 +231,8 @@ const char *get_data_format_str(zdnn_data_formats format) {
229231
switch (format) {
230232
CASE_RTN_STR(ZDNN_FORMAT_4DFEATURE);
231233
CASE_RTN_STR(ZDNN_FORMAT_4DKERNEL);
234+
CASE_RTN_STR(ZDNN_FORMAT_4DWEIGHTS);
235+
CASE_RTN_STR(ZDNN_FORMAT_4DGENERIC);
232236
}
233237
#undef CASE_RTN_STR
234238

@@ -242,11 +246,15 @@ short get_data_type_size(zdnn_data_types type) {
242246
return (b);
243247

244248
switch (type) {
249+
CASE_RTN_SIZE(INT8, 1);
250+
CASE_RTN_SIZE(INT32, 4);
245251
CASE_RTN_SIZE(BFLOAT, 2);
246252
CASE_RTN_SIZE(FP16, 2);
247253
CASE_RTN_SIZE(FP32, 4);
248254
CASE_RTN_SIZE(ZDNN_DLFLOAT16, 2);
249-
CASE_RTN_SIZE(INT8, 1);
255+
CASE_RTN_SIZE(ZDNN_BINARY_FP32, 4);
256+
CASE_RTN_SIZE(ZDNN_BINARY_INT8, 1);
257+
CASE_RTN_SIZE(ZDNN_BINARY_INT32, 4);
250258
}
251259
#undef CASE_RTN_SIZE
252260

@@ -480,14 +488,14 @@ zdnn_status verify_transformed_descriptor(const zdnn_tensor_desc *tfrmd_desc) {
480488
return ZDNN_INVALID_TYPE;
481489
}
482490

483-
const uint32_t *dims_ptr = &(tfrmd_desc->dim4);
484-
485491
/* ToFix: the nnpa_query_result is not set up with onnx-mlir
486492
* Temporarily commented out.
487493
* Refer to issue #3034
488494
*/
489495

490496
#if 0
497+
const uint32_t *dims_ptr = &(tfrmd_desc->dim4);
498+
491499
// is the dimension above the limit or zero?
492500
// transformed layout uses all dim* entries, so we'll check them all
493501
for (int i = 0; i < ZDNN_MAX_DIMS; i++) {

0 commit comments

Comments
 (0)