+
    jHàjà
  ã                  ól   € R t ^ RIHt ^ RIHt ^ RIHt ]R,          tRtRt	R R lt
R R ltR	 R
 ltR# )z�NVIDIA platform recognition derived from host facts.

Recognition uses OS-reported CPU, GPU or PCI identity without environment-variable input.
)Úannotations)ÚLiteral)ÚfactsÚN1Xc               ó    € V ^8„  d   QhRRRR/# )é   Úpci_idÚintÚreturnÚbool© )Úformats   "ÚB/home/ubuntu/.hermes/hermes-agent/hermes_platform/host/products.pyÚ__annotate__r      s   € ÷ Jñ J ð J¨ñ Jó    c                ód   € V R,          R8H  ;'       d    RV ^,	          u;8*  ;'       d    R8*  # u # )z<Recognize N1X; NVML packs device above the 16-bit vendor ID.iÿÿ  iÞ  i .  i?.  r   )r   s   &r   Úis_nvidia_n1x_pci_idr      s0   € à�F�?˜fÑ$×IÐI¨°6¸Rµ<×)IÔ)IÀ6Ñ)IÐIÑ)IÐIr   c               ó0   € V ^8„  d   QhRRRRRRRRRRRR	/# )
r   Ú	os_familyÚstrÚnative_archÚ	cpu_modelÚ	gpu_classÚnvidia_gpusztuple[facts.NvidiaGpu, ...]r
   úNvidiaPlatform | Noner   )r   s   "r   r   r      s9   € ÷ 9ñ 9¨3ð 9¸Sð 9ÈSð 9Ð]`ð 9Ø*Eð9ØJ_ñ9r   c                ó*  aa€ VP                  RR4      P                  4       oVR8X  dQ   V R8X  dJ   \        ;QJ d    R V 4       F  '       g   K   RM	  RM! R V 4       4      pV'       g   \        S9   d   R# VR8X  dŠ   V P	                  R	4      '       ds   RP                  R
 V 4       4      P                  4       o\        ;QJ d$    VV3R l\         4       F  '       g   K   RM	  RM! VV3R l\         4       4      '       d   R# VR8X  d   R# R# )aù  Return the NVIDIA platform the supplied host facts describe, or ``None`` without an NVIDIA GPU.

- ``rtx_spark``: Windows on arm64 whose CPU name carries the N1X marker or whose GPU is in
  ``is_nvidia_n1x_pci_id``'s range, the same range the local catalog's measured row uses.
- ``dgx_spark``: Linux on arm64 whose NVIDIA driver names a GB10 GPU, or whose CPU or
  device-tree model names GB10 or DGX Spark. Other arm64 NVIDIA servers are ``discrete``.
- ``discrete``: any other host with an NVIDIA GPU.
Ú_Ú Úarm64Úwin32c              3  óv   "  € T F/  qP                   R J;'       d    \        VP                   4      x € K1  	  R # 5i©N)r   r   ©Ú.0Úgpus   & r   Ú	<genexpr>Ú+classify_nvidia_platform.<locals>.<genexpr>#   s/   é € ÐiÑ]hÐVY—j‘j¨Ð,×QÐQÔ1EÀcÇjÁjÓ1QÔQÓ]hùs   ‚9›9TFÚ	rtx_sparkÚlinuxc              3  ó8   "  € T F  qP                   x € K  	  R # 5ir!   )Únamer"   s   & r   r%   r&   '   s   é € Ð9©[ cŸž«[ùs   ‚c              3  óF   <"  € T F  qS9   ;'       g    VS9   x € K  	  R # 5ir!   r   )r#   ÚmarkerÚcpuÚnamess   & €€r   r%   r&   (   s$   øé € ÐQÑ>P°F˜‰×/Ð/ &¨C¡-Ô/Ó>Pùs   ƒ!“!Ú	dgx_sparkÚnvidiaÚdiscreteN)ÚreplaceÚupperÚanyÚ_RTX_SPARK_CPU_MARKERÚ
startswithÚjoinÚ_DGX_SPARK_MARKERS)r   r   r   r   r   Ún1x_gpur-   r.   s   $$$$$ @@r   Úclassify_nvidia_platformr:      sÌ   ù€ ð ×
Ñ
˜C Ó
%×
+Ñ
+Ó
-€CØ�gÔ )¨wÔ"6ß“#ÑiÑ]hÓi—#—#’#ÑiÑ]hÓiÓiˆßÔ+¨sÔ2ÙØ�gÔ )×"6Ñ"6°w×"?Ò"?Ø—‘Ñ9©[Ó9Ó9×?Ñ?ÓAˆß‹3ÕQÕ>PÓQ�3�3Š3ÕQÕ>PÓQ×QÒQÙØ" hÔ.ˆ:Ð8°DÐ8r   c               ó   € V ^8„  d   QhRR/# )r   r
   r   r   )r   s   "r   r   r   -   s   € ÷ Fñ FÐ.ñ Fr   c                 óà   € \        \        P                  ! 4       \        P                  ! 4       \        P                  ! 4       \        P
                  ! 4       \        P                  ! 4       R7      # )a<  The NVIDIA platform of this host; ``classify_nvidia_platform`` holds the rules.

Reads only cached host facts (registry, sysfs, procfs, sysctl): no subprocess, no driver
library, no network. Verified on an N1X laptop (native arm64 and emulated x64 Python): the
registry CPU name carries the N1X marker, both GPUs are NVIDIA display adapters with PCI
devices 0x2E03 and 0x2E06 (inside the catalog's N1X range), and the answer is ``rtx_spark``.
Not verified on hardware: the GB10 model name in ``/proc/driver/nvidia/gpus/*/information``
and the DGX Spark device-tree model.
)r   r   r   r   r   )r:   r   r   r   r   r   r   r   r   r   Únvidia_platformr=   -   sI   € ô $Ü—/’/Ó#´×1BÒ1BÓ1DÔPU×P_ÒP_ÓPaÜ—/’/Ó#´×1BÒ1BÓ1DôFð Fr   N)r'   r/   r1   )ÚGB10z	DGX SPARK)Ú__doc__Ú
__future__r   Útypingr   Úhermes_platform.hostr   ÚNvidiaPlatformr5   r8   r   r:   r=   r   r   r   Ú<module>rD      s=   ðñõ
 #å å &àÐ=Õ>€àÐ Ø*Ð õJõ
9÷,Fr   