+
    G%@i                     .    ^ RI HtHt  ! R R]]4      tR# )    )PluginIndependentPluginc                   F   a  ] tR t^t o RtRtRtRt]R 4       t	R t
RtV tR# )	Spyreu   Spyre chip is IBM’s AI accelerator, designed to handle AI inferencing
and workloads.

The Spyre plugin collects data about the Spyre card’s VFIO device node
tree, configuration files, and more.
z!IBM Spyre Accelerator Informationspyrec                
   . pV '       g   R# V P                  4        F  pVP                  4       '       g   K   VP                  ^R7      w  r4rVVP                  4       P                  R4      w  rxTR8X  g   K[  TR9   g   Kd  TP                  R4      ^8X  d
   RT,           p TP                  R4      w  rpTP                  R4      w  rTP                  YY34       K  	  V#   \         d     K  i ; i  \         d     K  i ; i)a/  Extract PCI domain, bus, device, function for devices that match:
- Vendor ID = 0x1014 (IBM)
- Device ID = 0x06a7 or 0x06a8

Parameters
----------
lspci_out : str
The output string from `lspci -n`.

Returns
-------
list of tuples
A list of (domain, bus, device, function) tuples for each matching
card.
N)maxsplit:1014z0000:.)06a706a8)
splitlinesstripsplitlower
ValueErrorcountappend)lspci_outputspyre_cardslinepci_addr_classids_restvendordevicedomainbusdev_func
pci_devicefunctions   &             :/usr/lib/python3/dist-packages/sos/report/plugins/spyre.pyget_ibm_spyre_devicesSpyre.get_ibm_spyre_devices   s    $  ++-D::<</3zz1z/E,#!$!2!23!7 F.>$>>>#&!+&1H,4NN3,?)F+3>>#+>(J ""F#FG' .*    " s#   6C!!'C3!C0/C03DDc                "   V P                  R 4      pVR,          ^ 8w  d   R# V P                  VR,          4      pV'       g   R# V F2  w  r4rVV RV RV RV 2pRV RV RV R2pV P                  VR	R
7       K4  	  V P                  . RO4       R# )zlspci -nstatusNoutputr
   r   z/sys/devices/pci/z	/vfio-devT)tree)z/etc/modprobe.d/vfio-pci.confz!/etc/udev/rules.d/95-vfio-3.rulesz#/etc/security/limits.d/memlock.conf)exec_cmdr%   add_dir_listingadd_copy_spec)	selflspcir   r   r    r   r#   r   pci_vfios	   &        r$   setupSpyre.setupH   s    j)?a00xA  .9)F 3%q(<H)&3%q
)LH   5 .9 	 
 	     N)zppc.*)__name__
__module____qualname____firstlineno____doc__
short_descplugin_namearchitecturesstaticmethodr%   r2   __static_attributes____classdictcell__)__classdict__s   @r$   r   r      s8      5JKM+ +Z r4   r   N)sos.report.pluginsr   r   r   r5   r4   r$   <module>rC      s    9QF% Qr4   