automatic DPDK test reports
 help / color / mirror / Atom feed
From: qemudev@loongson.cn
To: test-report@dpdk.org
Cc: Srikanth Yalavarthi <syalavarthi@marvell.com>, zhoumin@loongson.cn
Subject: |WARNING| pw125066 [PATCH v2 1/1] mldev: split bfloat16 routines to separate files
Date: Mon, 13 Mar 2023 19:50:20 +0800	[thread overview]
Message-ID: <202303131150.32DBoKYS617250@localhost.localdomain> (raw)
In-Reply-To: <20230313120306.28911-1-syalavarthi@marvell.com>

Test-Label: loongarch-compilation
Test-Status: WARNING
http://dpdk.org/patch/125066

_apply patch failure_

Submitter: Srikanth Yalavarthi <syalavarthi@marvell.com>
Date: Mon, 13 Mar 2023 05:03:06 -0700
DPDK git baseline: Repo:dpdk
  Branch: main
  CommitID: baf13c3135d0c5998fff7edc23fb89412dc89246

Apply patch set 125066 failed:

Checking patch lib/mldev/meson.build...
error: while searching for:
        'mldev_utils.c',
)

if dpdk_conf.has('RTE_ARCH_ARM64')
    sources += files('mldev_utils_neon.c')
else
    sources += files('mldev_utils_scalar.c')
endif

headers = files(
        'rte_mldev.h',
)

error: patch failed: lib/mldev/meson.build:7
error: lib/mldev/meson.build: patch does not apply
Checking patch lib/mldev/mldev_utils_neon.c...
Checking patch lib/mldev/mldev_utils_neon_bfloat16.c...
Checking patch lib/mldev/mldev_utils_scalar.c...
error: while searching for:
 * Copyright (c) 2022 Marvell.
 */

#include <errno.h>
#include <math.h>
#include <stdint.h>

#include "mldev_utils.h"

/* Description:
 * This file implements scalar versions of Machine Learning utility functions used to convert data
 * types from higher precision to lower precision and vice-versa.
 */

#ifndef BIT
#define BIT(nr) (1UL << (nr))
#endif

#ifndef BITS_PER_LONG
#define BITS_PER_LONG (__SIZEOF_LONG__ * 8)
#endif

#ifndef GENMASK_U32
#define GENMASK_U32(h, l) (((~0UL) << (l)) & (~0UL >> (BITS_PER_LONG - 1 - (h))))
#endif

/* float32: bit index of MSB & LSB of sign, exponent and mantissa */
#define FP32_LSB_M 0
#define FP32_MSB_M 22
#define FP32_LSB_E 23
#define FP32_MSB_E 30
#define FP32_LSB_S 31
#define FP32_MSB_S 31

/* float32: bitmask for sign, exponent and mantissa */
#define FP32_MASK_S GENMASK_U32(FP32_MSB_S, FP32_LSB_S)
#define FP32_MASK_E GENMASK_U32(FP32_MSB_E, FP32_LSB_E)
#define FP32_MASK_M GENMASK_U32(FP32_MSB_M, FP32_LSB_M)

/* float16: bit index of MSB & LSB of sign, exponent and mantissa */
#define FP16_LSB_M 0
#define FP16_MSB_M 9
#define FP16_LSB_E 10
#define FP16_MSB_E 14
#define FP16_LSB_S 15
#define FP16_MSB_S 15

/* float16: bitmask for sign, exponent and mantissa */
#define FP16_MASK_S GENMASK_U32(FP16_MSB_S, FP16_LSB_S)
#define FP16_MASK_E GENMASK_U32(FP16_MSB_E, FP16_LSB_E)
#define FP16_MASK_M GENMASK_U32(FP16_MSB_M, FP16_LSB_M)

/* bfloat16: bit index of MSB & LSB of sign, exponent and mantissa */
#define BF16_LSB_M 0
#define BF16_MSB_M 6
#define BF16_LSB_E 7
#define BF16_MSB_E 14
#define BF16_LSB_S 15
#define BF16_MSB_S 15

/* bfloat16: bitmask for sign, exponent and mantissa */
#define BF16_MASK_S GENMASK_U32(BF16_MSB_S, BF16_LSB_S)
#define BF16_MASK_E GENMASK_U32(BF16_MSB_E, BF16_LSB_E)
#define BF16_MASK_M GENMASK_U32(BF16_MSB_M, BF16_LSB_M)

/* Exponent bias */
#define FP32_BIAS_E 127
#define FP16_BIAS_E 15
#define BF16_BIAS_E 127

#define FP32_PACK(sign, exponent, mantissa)                                                        \
	(((sign) << FP32_LSB_S) | ((exponent) << FP32_LSB_E) | (mantissa))

#define FP16_PACK(sign, exponent, mantissa)                                                        \
	(((sign) << FP16_LSB_S) | ((exponent) << FP16_LSB_E) | (mantissa))

#define BF16_PACK(sign, exponent, mantissa)                                                        \
	(((sign) << BF16_LSB_S) | ((exponent) << BF16_LSB_E) | (mantissa))

/* Represent float32 as float and uint32_t */
union float32 {
	float f;
	uint32_t u;
};

int
rte_ml_io_float32_to_int8(float scale, uint64_t nb_elements, void *input, void *output)
{

error: patch failed: lib/mldev/mldev_utils_scalar.c:2
error: lib/mldev/mldev_utils_scalar.c: patch does not apply
Checking patch lib/mldev/mldev_utils_scalar.h...
Checking patch lib/mldev/mldev_utils_scalar_bfloat16.c...


       reply	other threads:[~2023-03-13 12:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20230313120306.28911-1-syalavarthi@marvell.com>
2023-03-13 11:50 ` qemudev [this message]
2023-03-13 12:03 ` |SUCCESS| " checkpatch
2023-03-13 14:58 |WARNING| pw125066 [PATCH] [v2, " dpdklab

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=202303131150.32DBoKYS617250@localhost.localdomain \
    --to=qemudev@loongson.cn \
    --cc=syalavarthi@marvell.com \
    --cc=test-report@dpdk.org \
    --cc=zhoumin@loongson.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).