Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2DC82CA0EED for ; Sun, 24 Aug 2025 23:32:59 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id B99F610E29D; Sun, 24 Aug 2025 23:32:58 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=igalia.com header.i=@igalia.com header.b="Ol6dZ/th"; dkim-atps=neutral Received: from fanzine2.igalia.com (fanzine2.igalia.com [213.97.179.56]) by gabe.freedesktop.org (Postfix) with ESMTPS id 69C0710E29D for ; Sun, 24 Aug 2025 23:32:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=igalia.com; s=20170329; h=Content-Transfer-Encoding:Content-Type:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Id:List-Help:List-Unsubscribe:List-Subscribe: List-Post:List-Owner:List-Archive; bh=EIJNbOg39sJJ86zt0lJEL0OPFvCkRz2zGqP860xuw3g=; b=Ol6dZ/thFWttWVffOFv7umy5Si wZK2aTdb0anqSiRnxpiDWosfk6tU6K+SfMJ9mA38rilU3aorB/kHJfiz9UNwu5/KZ/BoNAgOTjEkb NIhCmTYAalUWISdkuV3gXLFCyHZNabfuAu8kjl7/ULtKFEJG3w7qR8HpUJbCEVol/2DxJxKjkHRzM wQ+rH8LWymQUohGVjHv02RvjYwcNBmfPxZ9qpJTqzudssAFd7817v8TcdcX3P/8cmm+gxPrxtYCzx Ay0NVbbSsCKLMDdnoDPb1Qwvma5sVpi3NS1+Zkoho7XQfJQtKmJF6NrThdimu1iwVNcNdsw0u/Pta lD4nSn/w==; Received: from [104.193.135.201] (helo=debian.lan) by fanzine2.igalia.com with esmtpsa (Cipher TLS1.3:ECDHE_X25519__RSA_PSS_RSAE_SHA256__AES_256_GCM:256) (Exim) id 1uqKCi-00198j-Fn; Mon, 25 Aug 2025 01:32:53 +0200 From: Rodrigo Siqueira To: Alex Deucher , =?UTF-8?q?Christian=20K=C3=B6nig?= , =?UTF-8?q?Timur=20Krist=C3=B3f?= Cc: amd-gfx@lists.freedesktop.org, kernel-dev@igalia.com, Rodrigo Siqueira Subject: [PATCH v2 4/5] Documentation/gpu: Add more information about GC Date: Sun, 24 Aug 2025 17:29:44 -0600 Message-ID: <20250824233149.3780127-5-siqueira@igalia.com> X-Mailer: git-send-email 2.47.2 In-Reply-To: <20250824233149.3780127-1-siqueira@igalia.com> References: <20250824233149.3780127-1-siqueira@igalia.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: amd-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion list for AMD gfx List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: amd-gfx-bounces@lists.freedesktop.org Sender: "amd-gfx" This commit introduces a diagram and a set of information that details the different sets of schedulers available in the SE. Cc: Alex Deucher Cc: Christian König Cc: Timur Kristóf Signed-off-by: Rodrigo Siqueira --- Documentation/gpu/amdgpu/gc/cu.svg | 437 ++++++++++++++++++++++++++ Documentation/gpu/amdgpu/gc/index.rst | 32 +- 2 files changed, 463 insertions(+), 6 deletions(-) create mode 100644 Documentation/gpu/amdgpu/gc/cu.svg diff --git a/Documentation/gpu/amdgpu/gc/cu.svg b/Documentation/gpu/amdgpu/gc/cu.svg new file mode 100644 index 000000000000..10bdb3e24b65 --- /dev/null +++ b/Documentation/gpu/amdgpu/gc/cu.svg @@ -0,0 +1,437 @@ + + + + + + + + Right Arrow + + + + + + + + Dual Compute Unite (CU) + Schedulers + + + SGPR + + Float ALU + + Integer ALU + + Accelerators (e.g., AI) + + VGPR + + Scalar Unit + + ScalarCache + + ShaderInstructionCache + Block #1 + + Block #2 + + Block #3 + + Block #4 + + + CP + CPC + CPG + CPF + + + } + ( + ( + + + diff --git a/Documentation/gpu/amdgpu/gc/index.rst b/Documentation/gpu/amdgpu/gc/index.rst index ff6e9ef5cbee..19f2ba53ee49 100644 --- a/Documentation/gpu/amdgpu/gc/index.rst +++ b/Documentation/gpu/amdgpu/gc/index.rst @@ -10,16 +10,36 @@ producer-consumer problem, where the CPU fills out a buffer with operations the buffer are called Command Packets, which can be summarized as a compressed way of transmitting command information to the graphics controller. +In the diagram below, you can see an overview of the GC, along with additional +information about the Shader Engine (SE). + +.. kernel-figure:: cu.svg + +First of all, note that the GC can have multiple SEs, depending on the specific +GPU/APU, and each SE has multiple Compute Units (CU). From the diagram, you can +see that CUs have a block named Schedulers. The reason the name is in plural is +because this hardware block is a combination of different micro-schedules: CP, +CPF, CPC, and CPG. + The component that acts as the front end between the CPU and the GPU is called -the Command Processor (CP). This component is responsible for providing greater +CP (Command Processor). This component is responsible for providing greater flexibility to the GC since CP makes it possible to program various aspects of the GPU pipeline. CP also coordinates the communication between the CPU and GPU via a mechanism named **Ring Buffers**, where the CPU appends information to -the buffer while the GPU removes operations. It is relevant to highlight that a -CPU can add a pointer to the Ring Buffer that points to another region of -memory outside the Ring Buffer, and CP can handle it; this mechanism is called -**Indirect Buffer (IB)**. CP receives and parses the Command Streams (CS), and -writes the operations to the correct hardware blocks. +the buffer while the GPU removes operations. Finally, CP is also responsible +for handling Indirect Buffers (IB). + +After CP completes the first set of processing, which includes separate command +packets specific to GFX and Compute, other blocks step in. To handle commands +for the compute block, CPC (Command Processor Command) takes over, and for +handling Graphics operations, the CPG (Command Processor Graphics) takes +action. Another essential block to ensure the optimal utilization of CPC and +CPG is the CPF (Command Processor Fetcher), which helps these blocks to be +constantly fed. Note that CPG contains the PFP (Pre-Fetch Parser), ME +(MicroEngine), and CE (Constant Engine) in the case of chips that support it. +CPC contains MEC (MicroEngine Compute), and CPF is another hardware block that +provides services to CPG and CPC. + Graphics (GFX) and Compute Microcontrollers ------------------------------------------- -- 2.47.2