From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5BD8121FF25 for ; Sat, 15 Aug 2026 13:06:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786799166; cv=none; b=JAO9i9wk2ihbO+ALWajCologtA/YzU/0FO8RPECmL9KZzJVwt6o2a/t6Xh0s5H8oRu0OawVE7ijn0cHaXzfsouVGqWQmMO/SGyFNKxvCF4syXIDaKqNuh6gVrPGv4RF71tx9eaXqOR2X1q4bB+va/Xsit9kiDPkn5zS08HDj710= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1786799166; c=relaxed/simple; bh=5EfxUeqlpjwN3vEIq6p8vpRqtpNH0U++/oWzufEPFG8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AFDrUhV/ApM7DB6mThNdUamImBB5PSvA05EEW0yR+4X7h8SyzoaAfyJiMdZfeWbtQ471SBkkeo0mokT90ypk0FoF8Fe0MWbNW4f6k2Z1nuc4IlI5bx6lSnYSVAJRlmz2Oyen20fdv7YaH+KySHQ1hu1GF0a5ujYgDJ/xRiYe0e8= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=a0Eki7TX; arc=none smtp.client-ip=209.85.128.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="a0Eki7TX" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4995df974b3so1028885e9.0 for ; Sat, 15 Aug 2026 06:06:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1786799163; x=1787403963; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=6TunZ6T1253lLJ2+HTnnlCLT2K1O14zopzv5ooYmm6w=; b=a0Eki7TX92Ljt1Fwvg1ty7o7P5SbrZFll2P23anO0/2EXo99fXOTap7Q/NG0J9vwn0 jBs8XztVZO+hksVB+7A2ueBd5DXdlAWwOylsHPVHuO0wogdZx/uJ+7MoN1b1EK9EzVfK 5tdzmSSEFp61cxy8eQRggVLKs/VRzvtACo5hy1onX6Yp1S2QRoJaL1WqQsQmRLJamilK 1EIHBzV0L1rXegpU1n1TYLUZyQsNUI4DE7NeVGAR0dMWts2+OqhXOJyWJO8GHJySBFay vBkGu77C5vpx33fYuMGAJr0XpQlnpv6mNvAwYQqNe+ZmWpkq6ICKf7+CSibsDl70MFXt 7ICw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1786799163; x=1787403963; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=6TunZ6T1253lLJ2+HTnnlCLT2K1O14zopzv5ooYmm6w=; b=lWQLxlxSY9x3TsuMRcM/HFpVGXURYCWQBZMnMsz+y1YGEXY5oHpMxG582tcOOrE4x+ a4Fb9IiwCekzhjep7+Vfo0FOAhFWAIz7Prc5uWNvsWgY8HhD3OwsmgbKOZAoX4UTnfWM zfZKDicZm9vEfYAQ+7ALMk6feCIAClll4TqVGvihgdSp/V0wDz5qybNuZyTg9FOFeSuf c5pLs19kZKxdWtJjodp6rfDLrHSXURg1hwADit5sPkxowslSgcNAkmBTYz8FW+DokK37 kniMqtViaBqUGT1fHLfHD9Crd91Hf8Epaz1q/vzMM5EcSR/XeGOGikf+IblxTpMbIm94 tFAQ== X-Forwarded-Encrypted: i=1; AHgh+Ro4SCPUn2w7bzvkvrLomA/e5FQqj576J7qw3cbtd8l4KrAYwRdhpTkOSfarprSCQjz2MHe0uP3RAdxTdM8=@vger.kernel.org X-Gm-Message-State: AOJu0YyKuE58mm8Mhu4hIccyyIgM+5mO/MtPMlFGfgHWG4x/nChK2PFp vuraHmcwHUBEQqSv8V7ErIjq27qc68NsX9GlRkY79z0u3HkaqKbnZAaW X-Gm-Gg: AR+sD12UbVWPZeV6MGn6yTwkcFLRYJKiB9HMapAWcyQ+NYbLYLywkBlk61YvualoXnI UFuqLLAFACdWK8rMid61w05mhoGW0nd7SHwuFH+lGi4PC6V6Zc3CfBVD228bI8+lQcE7Jhu4Y8Q BF/QrRbI14eygCp0677nKWKOclvh3h/i++HyrfoVWKx2szYJaipX643TKgTmkq3Pl7709MDninS 2WEQhSJSOCw4gAv4VODGs5Ugj9EkewSBqjDelt63yxpQ6/490LC75bAhuxdlZFz8xhQJhD8clFA cWl2LaYPKGM4dUm9yYOw5y4qRDQBcLbbr5ljB6q/LfhuiI31f5jxSmHVK6Yua5ObTDOl78Yl8Rc brU9rxhJhKVR7ky4jUwwsFTeLxXa4rP31dz7R0YXeo/zC29EQiDWYzeEzG8B/oQ4Ak+3JnjqtZ8 RGby/v6cDKB3OE3mC5/KbE31FQ0DYCW61SzdPE95TODi0ijA1sj3493UBkIjSGcdEPbwUzeLD++ iTHa0KuXvgDycleI9klPqz7tNSaetgk1c3skTBvBNJ1db+jGUwk63mjU01/NJ13yZtYqQMzQNoX i8U= X-Received: by 2002:a05:600c:354f:b0:495:650b:4c61 with SMTP id 5b1f17b1804b1-499879690acmr87570305e9.3.1786799163529; Sat, 15 Aug 2026 06:06:03 -0700 (PDT) Received: from OrangePi5-Plus.BB-HOME (20014C4E1B932600BF05B505F15B0ECC.dsl.pool.telekom.hu. [2001:4c4e:1b93:2600:bf05:b505:f15b:ecc]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4999130d9a4sm59398995e9.15.2026.08.15.06.06.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 15 Aug 2026 06:06:03 -0700 (PDT) From: Igor Paunovic To: Jiaxing Hu Cc: Igor Paunovic , Tomeu Vizoso , =?UTF-8?q?Heiko=20St=C3=BCbner?= , Chaoyi Chen , Alexey Charkov , 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: Sat, 15 Aug 2026 15:05:53 +0200 Message-ID: <20260815130556.68876-1-royalnet026@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260815031219.3860651-1-gahing@gahingwoo.com> References: <20260812094106.1391698-1-gahing@gahingwoo.com> <20260812094106.1391698-9-gahing@gahingwoo.com> <20260814110825.14893-1-royalnet026@gmail.com> <20260815031219.3860651-1-gahing@gahingwoo.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Hi Jiaxing, Here is operator 28 on RK3588, and it changes the picture: it is not an empty convolution here, and once the reference is right it is the cleanest operator in the whole model. Setup as before - same board, same upstream Mesa at bf70ab68a21, none of your four unposted fixes, ROCKET_SEED=7, model truncated the same way as the table (subgraph output repointed to the operator's output tensor, here the 1x1x1001 BiasAdd). One change to disclose: the kernel moved from 7.2.0-rc6 to 7.2.0-rc7 as my daily since the table. The rc6 run also had my devfreq patches in the rocket driver; this rc7 rocket has no devfreq node registered, so it runs like yours does. Before running operator 28 I re-ran operators 0-4 as a control and all five reproduce the published column exactly (32/32 md 1, 28/32 md 3, 22/64 md 6, 21/64 md 13, 8/128 md 15), so neither the kernel change nor the devfreq difference moves these numbers. Scored exactly the way perch.py scores, operator 28 reads: 674/1001 channels match, maxdiff 29 NOT empty: only 36 of 1001 channels sit at the output zero point, 71 distinct output values, min 37, max 117 (zp = 66) But that maxdiff 29 is the reference, not the hardware. perch.py scores against max(cpu, zp), which is right for operators 0-26 with their fused ReLU6 - the hardware really does floor those at the zero point. Operator 28 has no fused activation (it is the logits BiasAdd), and RK3588 does not floor it: the raw CPU output has 362 channels below the zero point (down to 37) and the NPU follows them down instead of clamping. Against the raw, unclamped CPU output: seed 7: 1001/1001 channels within 1, maxdiff 1 (708 exact, 293 off by one) seed 8: 1001/1001 within 1, maxdiff 1 three seed-7 runs byte-identical So on RK3588 with upstream Mesa, 1001 output channels - odd AND not a multiple of 8 - come out clean without either of your unposted fixes. Whatever those two fixes change, this SoC's path does not need it for correctness at this operator. It may be worth re-scoring your RK3576 operator 28 against the unclamped CPU as well before reading its "empty convolution" - if RK3576 also skips the floor on a no-activation conv, the max(cpu, zp) reference alone moves several hundred channels. Two small notes for reproduction: perch.py prints the headline and then crashes on this operator at its spatial-profile section (got[1:-1,1:-1] on a 1x1 surface is empty) - the numbers above it are unaffected. And I find it a nice detail that my board reads md 23 at operator 26, yet after the CPU average-pool the classifier lands within 1 of the CPU - the pooling averages the deep-layer noise away, which fits your 1000 of 1001 end-to-end result. This reply was prepared with the help of Claude (Anthropic). The board, the runs and the numbers are mine, and each number above comes from a run on this machine today. Best regards, Igor