gpu: nova-core: clarify FSP ordering in the chipset table
Subsystems (4)
PATCH v2 1/1 gpu: nova-core: clarify FSP ordering in the chipset table
The Chipset enum lists GPUs in chip-ID order, but FSP capability does not follow that order. Hopper and Blackwell boot the GSP via FSP, while Ada, whose chip IDs fall numerically between Hopper and Blackwell, uses the older SEC2 booter path instead. Add a comment so the table ordering does not suggest that everything past Hopper uses FSP.
---
Changes since v1 [1]:
* Keep the existing "Hopper and later" wording in uses_fsp() rather than changing it, and put the clarification entirely in the chipset table comment (Timur Tabi).
* Reword that comment to describe the Hopper/Ada chip-ID inversion and to say "Hopper and later" excludes Ada and means Hopper, Blackwell, Rubin, and everything after that, so it stays correct once Rubin is added (Timur Tabi).
[1] https://lore.kernel.org/all/[email protected]/
drivers/gpu/nova-core/gpu.rs | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/nova-core/gpu.rs +4 -0
@@ -91,6 +91,10 @@ fn try_from(value: u32) -> Result<Self, Self::Error> { GA104 = 0x174, GA106 = 0x176, GA107 = 0x177, +// Chip IDs are in numerical order, which does not match FSP capability. Hopper (GH100) has a +// lower chip ID than Ada (AD10x), yet Hopper boots the GSP via FSP while Ada uses the older +// SEC2 booter. We therefore consider Hopper to be after Ada, so "Hopper and later" excludes +// Ada and means Hopper, Blackwell, Rubin, and everything after that. // Hopper GH100 = 0x180,// Ada
base-commit: 550dc7536644db2d67c6f8cf525bba682fba08d9
Signature · 1 line
2.54.0
Quoted 32 lines · John Hubbard
The Chipset enum lists GPUs in chip-ID order, but FSP capability does not follow that order. Hopper and Blackwell boot the GSP via FSP, while Ada, whose chip IDs fall numerically between Hopper and Blackwell, uses the older SEC2 booter path instead. Add a comment so the table ordering does not suggest that everything past Hopper uses FSP.
Suggested-by Timur Tabi <[email protected]>Signed-off-by John Hubbard <[email protected]>---
Changes since v1 [1]:
* Keep the existing "Hopper and later" wording in
uses_fsp()rather than changing it, and put the clarification entirely in the chipset table comment (Timur Tabi).* Reword that comment to describe the Hopper/Ada chip-ID inversion and to say "Hopper and later" excludes Ada and means Hopper, Blackwell, Rubin, and everything after that, so it stays correct once Rubin is added (Timur Tabi).
[1] https://lore.kernel.org/all/[email protected]/
drivers/gpu/nova-core/gpu.rs | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/nova-core/gpu.rs +0
-0
drivers/gpu/nova-core/gpu.rs fn try_from(value: u32) -> Result<Self, Self::Error> { · line 97
Quoted 7 lines
drivers/gpu/nova-core/gpu.rs +4
-0@@ -91,6 +91,10 @@ fn try_from(value: u32) -> Result<Self, Self::Error> { GA104 = 0x174, GA106 = 0x176, GA107 = 0x177, +// Chip IDs are in numerical order, which does not match FSP capability. Hopper (GH100) has a +// lower chip ID than Ada (AD10x), yet Hopper boots the GSP via FSP while Ada uses the older +// SEC2 booter. We therefore consider Hopper to be after Ada, so "Hopper and later" excludes +// Ada and means Hopper, Blackwell, Rubin, and everything after that.
This would be inconsistent with the derived PartialOrd implementation?
If we consider Hopper to be after Ada, then we should be able to assert!(GH100 > AD102);
Best,
Gary
Quoted 5 lines
drivers/gpu/nova-core/gpu.rs +0
-0// Hopper GH100 = 0x180,// Ada base-commit:
550dc7536644db2d67c6f8cf525bba682fba08d9
Quoted 3 lines · Gary Guo
This would be inconsistent with the derived
PartialOrdimplementation?If we consider Hopper to be after Ada, then we should be able to
assert!(GH100 > AD102);
This is a comment about how we describe things, not how the code works. It's because we frequently say "Hopper or later" to describe our GPUs' capabilities.
Quoted 7 lines · Timur Tabi
Quoted 3 lines · Gary Guo
This would be inconsistent with the derived
PartialOrdimplementation?If we consider Hopper to be after Ada, then we should be able to
assert!(GH100 > AD102);This is a comment about how we describe things, not how the code works. It's because we frequently say "Hopper or later" to describe our GPUs' capabilities.
If the code often needs to say "Hopper or later", then I'd say the comparison would want to be consistent with that too, no?
When would you want GH100 < AD102 in your code?
Best,
Gary
Quoted 4 lines · Gary Guo
If the code often needs to say "Hopper or later", then I'd say the comparison would want to be consistent with that too, no?
When would you want
GH100 < AD102in your code?
I guess I'm just not being clear. The phrase "Hopper and later" is just a phrase to describe Hopper, Blackwell, Rubin, and whatever comes after it. The whole point behind the comment is that you're supposed to ignore the chip_id numbering when you read that phrase.
Quoted 9 lines · Timur Tabi
Quoted 4 lines · Gary Guo
If the code often needs to say "Hopper or later", then I'd say the comparison would want to be consistent with that too, no?
When would you want
GH100 < AD102in your code?I guess I'm just not being clear. The phrase "Hopper and later" is just a phrase to describe Hopper, Blackwell, Rubin, and whatever comes after it. The whole point behind the comment is that you're supposed to ignore the
chip_idnumbering when you read that phrase.
And clearly the comment has failed in its goal, seeing as how our first reader had trouble understanding what we meant. :) Gary, any thoughts about how to clarify this? Or is this whole idea of talking about Hopper and later turning into a problem...?
thanks,
Signature · 1 line
John Hubbard
Quoted 4 lines · John Hubbard
And clearly the comment has failed in its goal, seeing as how our first reader had trouble understanding what we meant. :) Gary, any thoughts about how to clarify this? Or is this whole idea of talking about Hopper and later turning into a problem...?
I mean, it can't be a problem because that's how everyone in Nvidia talks. The point of the comment is to reconcile the language we use with the hardware register.
We're not going to stop saying "Hopper and later", and we're never going to mean that to include Ada.
We probably need to comment the Architecture enum too:
pub(crate) enum Architecture with TryFrom<Bounded<u32, 6>> {
Turing = 0x16,
Ampere = 0x17,
Hopper = 0x18,
Ada = 0x19,
BlackwellGB10x = 0x1a,
BlackwellGB20x = 0x1b,
}Ugh. Maybe we should swap Hopper and Ada here?