From: Jiaxing Hu <gahing@gahingwoo.com>
To: royalnet026@gmail.com
Cc: tomeu@tomeuvizoso.net, heiko@sntech.de,
chaoyi.chen@rock-chips.com, alchark@flipper.net,
dri-devel@lists.freedesktop.org,
linux-rockchip@lists.infradead.org,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH v7 08/10] accel/rocket: add RK3576 NPU (RKNN) support
Date: Mon, 17 Aug 2026 07:58:37 +1200 [thread overview]
Message-ID: <20260816195837.497735-1-gahing@gahingwoo.com> (raw)
In-Reply-To: <CAEWPSH54fhzKEYR1cgTskNgKryDEMaZOY1y5aFdKQQyzfKbYfg@mail.gmail.com>
Hi Igor,
You are right that it is fitted, and decoding it against registers.xml was
worth more than the fit was. I had been treating those two words as opaque
constants and comparing predicates, when the thing that varies is one bit.
Your reading also named an experiment I had never run. Every measurement this
board has produced was of the value my predicate happens to emit, so 16 and 41
output channels had only ever run with SIZE_E_2 0, and 56, 64 and 128 only with
1. The cell nobody had filled in was SIZE_E_2 1 at the small counts. Forcing
the constant fills it.
output channels predicate forced SIZE_E_2 1
16 16 of 16 NPU job timed out, 0 of 16
41 41 of 41 0 of 41
56 56 of 56 56 of 56
128 128 of 128 128 of 128
So each form fails on the shapes the other handles, which makes it a two sided
measurement rather than the one sided fit it started as. Taken with your RK3588
result, RK3588 does not need the toggle and RK3576 does, and what the toggle
selects is SIZE_E_2 rather than anything about the channel count as such. I
will write it that way, as the field with a reason, rather than as a modulo or
a parity of something.
The other bits you flagged I cannot defend yet. RGP_CNTER 8, OW_SRC 1 and the
two in the reserved range came from vendor captures and have never been varied
one at a time. That is a sweep this board can run and I will do it before the
Mesa series goes out, since a value nobody can explain is a value nobody should
be asked to review.
On the unclamped reference, thank you for using it. It changed what I thought I
had here as well. The clamp is only free where the quantised output range
starts at zero, and on a middle zero point layer it rewrites about half the
surface. conv2d-cal is out_zp 128 with no fused activation, and against the
unclamped output it is 0 of 128 channels rather than 128 of 128, with the
hardware equal to max(cpu, out_zp) to within one everywhere. Where that clamp
comes from is still open. It is not the output offset, not the BS block, not
any register in the stream, and not the coefficient records, all four measured
rather than argued.
If you want another shape, an output channel count of 88 or 120 on RK3576 would
tell us whether the toggle follows the same rule up there, and those are exactly
the counts you already have on the other SoC.
Jiaxing
next prev parent reply other threads:[~2026-08-16 19:59 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-12 9:40 [PATCH v7 00/10] accel/rocket: RK3576 NPU (RKNN) enablement Jiaxing Hu
2026-08-12 9:40 ` [PATCH v7 01/10] accel/rocket: take the completion register writes under job_lock Jiaxing Hu
2026-08-12 12:47 ` Igor Paunovic
2026-08-12 9:40 ` [PATCH v7 02/10] dt-bindings: npu: rockchip: add rockchip,rk3576-rknn-core Jiaxing Hu
2026-08-13 7:04 ` Krzysztof Kozlowski
2026-08-12 9:40 ` [PATCH v7 03/10] dt-bindings: power: rockchip: allow resets in a power domain node Jiaxing Hu
2026-08-13 7:06 ` Krzysztof Kozlowski
2026-08-14 8:21 ` Jiaxing Hu
2026-08-12 9:40 ` [PATCH v7 04/10] dt-bindings: iommu: rockchip: allow the RK3576 NPU MMU clock set Jiaxing Hu
2026-08-12 10:45 ` Diederik de Haas
2026-08-13 9:27 ` Jiaxing Hu
2026-08-12 9:41 ` [PATCH v7 05/10] pmdomain/rockchip: add optional per-domain power-on settle delay Jiaxing Hu
2026-08-12 9:41 ` [PATCH v7 06/10] pmdomain/rockchip: cycle optional power-domain resets on power-on Jiaxing Hu
2026-08-12 9:41 ` [PATCH v7 07/10] accel/rocket: select the per-core clock and reset counts from match data Jiaxing Hu
2026-08-12 9:41 ` [PATCH v7 08/10] accel/rocket: add RK3576 NPU (RKNN) support Jiaxing Hu
2026-08-12 12:48 ` Igor Paunovic
2026-08-13 9:26 ` Jiaxing Hu
2026-08-13 9:56 ` Igor Paunovic
2026-08-14 8:26 ` Jiaxing Hu
2026-08-14 11:08 ` Igor Paunovic
[not found] ` <20260814110841.11238-1-royalnet026@gmail.com>
2026-08-15 3:12 ` Jiaxing Hu
2026-08-15 13:05 ` Igor Paunovic
2026-08-16 4:12 ` Jiaxing Hu
2026-08-16 18:53 ` Igor Paunovic
2026-08-16 19:58 ` Jiaxing Hu [this message]
2026-08-16 20:25 ` Igor Paunovic
2026-08-12 9:41 ` [PATCH v7 09/10] arm64: dts: rockchip: rk3576: add NPU (RKNN) nodes Jiaxing Hu
2026-08-12 9:41 ` [PATCH v7 10/10] arm64: dts: rockchip: rk3576-rock-4d: enable NPU Jiaxing Hu
2026-08-12 10:20 ` Chaoyi Chen
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=20260816195837.497735-1-gahing@gahingwoo.com \
--to=gahing@gahingwoo.com \
--cc=alchark@flipper.net \
--cc=chaoyi.chen@rock-chips.com \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=royalnet026@gmail.com \
--cc=tomeu@tomeuvizoso.net \
/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