Skip to main content

gpus

Creates, updates, deletes, gets or lists a gpus resource.

Overview​

Namegpus
TypeResource
Idnvidia.catalog.gpus

Fields​

The following fields are returned by SELECT queries:

NameDatatypeDescription
pci_device_idstringPCI Device ID (wire: pciDeviceId)
pci_subsystem_device_idstringPCI Subsystem Device ID (wire: pciSubsystemDeviceId)
pci_vendor_idstringPCI Vendor ID (wire: pciVendorId)
display_namestringDisplay name for the GPU (wire: displayName)
label_namestringLabel name for the GPU (wire: labelName)
created_atstring (date_time)Creation timestamp (wire: createdAt)
cuda_major_versionstringCUDA major version (wire: cudaMajorVersion)
cuda_minor_versionstringCUDA minor version (wire: cudaMinorVersion)
form_factorstringGPU form factor (wire: formFactor)
gpu_countsarray (wire: gpuCounts)
memory_size_gbinteger (int32)Memory size in GB (smallint range) (wire: memorySizeGb)
request_statusobjectRequest status information (wire: requestStatus)
updated_atstring (date_time)Last update timestamp (wire: updatedAt)

Methods​

The following methods are available for this resource:

NameAccessible byRequired ParamsOptional ParamsDescription
get_by_vendor_subsystemselectpci_device_id, pci_vendor_id, pci_subsystem_device_idGet a single GPU record matching the full PCI composite key
get_by_vendorselectpci_device_id, pci_vendor_idGet all GPUs by PCI records matching the given PCI Device ID and Vendor ID
getselectpci_device_idGet all GPU records matching the given PCI Device ID
listselectGet all GPU by PCI records
create_by_vendor_subsysteminsertpci_device_id, pci_vendor_id, pci_subsystem_device_id, display_name, pci_device_idCreate a new GPU record using the full PCI composite key
createinsertpci_device_id, display_name, pci_device_idCreate a new GPU record using only PCI Device ID (pciVendorId and pciSubsystemDeviceId default to 'unknown')
update_by_vendor_subsystemupdatepci_device_id, pci_vendor_id, pci_subsystem_device_idPartially update a GPU record matching the full PCI composite key. Only provided fields will be updated.
updateupdatepci_device_idPartially update a GPU record using only PCI Device ID (pciVendorId and pciSubsystemDeviceId default to 'unknown'). Only provided fields will be updated.
delete_by_vendor_subsystemdeletepci_device_id, pci_vendor_id, pci_subsystem_device_idDelete a GPU record matching the full PCI composite key
deletedeletepci_device_idDelete a GPU record using only PCI Device ID (pciVendorId and pciSubsystemDeviceId default to 'unknown')

Parameters​

Parameters can be passed in the WHERE clause of a query. Check the Methods section to see which parameters are required or optional for each operation.

NameDatatypeDescription
pci_device_idstring (UTF-8)PCI Device ID
pci_subsystem_device_idstring (UTF-8)PCI Subsystem Device ID
pci_vendor_idstring (UTF-8)PCI Vendor ID

SELECT examples​

Get a single GPU record matching the full PCI composite key

SELECT
pci_device_id,
pci_subsystem_device_id,
pci_vendor_id,
display_name,
label_name,
created_at,
cuda_major_version,
cuda_minor_version,
form_factor,
gpu_counts,
memory_size_gb,
request_status,
updated_at
FROM nvidia.catalog.gpus
WHERE pci_device_id = '{{ pci_device_id }}' -- required
AND pci_vendor_id = '{{ pci_vendor_id }}' -- required
AND pci_subsystem_device_id = '{{ pci_subsystem_device_id }}' -- required
;

INSERT examples​

Create a new GPU record using the full PCI composite key

INSERT INTO nvidia.catalog.gpus (
cuda_major_version,
cuda_minor_version,
display_name,
form_factor,
gpu_counts,
label_name,
memory_size_gb,
pci_device_id,
pci_subsystem_device_id,
pci_vendor_id,
pci_device_id,
pci_vendor_id,
pci_subsystem_device_id
)
SELECT
'{{ cuda_major_version }}',
'{{ cuda_minor_version }}',
'{{ display_name }}' /* required */,
'{{ form_factor }}',
'{{ gpu_counts }}',
'{{ label_name }}',
{{ memory_size_gb }},
'{{ pci_device_id }}' /* required */,
'{{ pci_subsystem_device_id }}',
'{{ pci_vendor_id }}',
'{{ pci_device_id }}' /* required */,
'{{ pci_vendor_id }}',
'{{ pci_subsystem_device_id }}'
RETURNING
pci_device_id,
pci_subsystem_device_id,
pci_vendor_id,
display_name,
label_name,
created_at,
cuda_major_version,
cuda_minor_version,
form_factor,
gpu_counts,
memory_size_gb,
request_status,
updated_at
;

UPDATE examples​

Partially update a GPU record matching the full PCI composite key. Only provided fields will be updated.

UPDATE nvidia.catalog.gpus
SET
cuda_major_version = '{{ cuda_major_version }}',
cuda_minor_version = '{{ cuda_minor_version }}',
display_name = '{{ display_name }}',
form_factor = '{{ form_factor }}',
gpu_counts = '{{ gpu_counts }}',
label_name = '{{ label_name }}',
memory_size_gb = {{ memory_size_gb }}
WHERE
pci_device_id = '{{ pci_device_id }}' --required
AND pci_vendor_id = '{{ pci_vendor_id }}' --required
AND pci_subsystem_device_id = '{{ pci_subsystem_device_id }}' --required
RETURNING
pci_device_id,
pci_subsystem_device_id,
pci_vendor_id,
display_name,
label_name,
created_at,
cuda_major_version,
cuda_minor_version,
form_factor,
gpu_counts,
memory_size_gb,
request_status,
updated_at;

DELETE examples​

Delete a GPU record matching the full PCI composite key

DELETE FROM nvidia.catalog.gpus
WHERE pci_device_id = '{{ pci_device_id }}' --required
AND pci_vendor_id = '{{ pci_vendor_id }}' --required
AND pci_subsystem_device_id = '{{ pci_subsystem_device_id }}' --required
;