mirror of
https://github.com/hanzoai/swift-sdk.git
synced 2026-10-30 18:20:19 +00:00
The forge tree held the package scaffolding and none of the generated sources — 2,435 files of APIs, Models and Infrastructure, including BaseAPI, were simply absent, so anything depending on this copy had a package that compiled to nothing usable. Generated from the current API document rather than reconciled with the other copy: a client is a function of the spec, so regenerating answers "which history wins" without anyone having to choose. .spec-lock records which document, so the next reader can tell.
46 lines
1.8 KiB
Swift
46 lines
1.8 KiB
Swift
//
|
|
// ByoGPU.swift
|
|
//
|
|
// Generated by openapi-generator
|
|
// https://openapi-generator.tech
|
|
//
|
|
|
|
import Foundation
|
|
|
|
public struct ByoGPU: Sendable, Codable, ParameterConvertible, Hashable {
|
|
|
|
/** Arch is the card's native compile target (\"gfx1151\"), which is what a kernel has to be built for. AMD reports one; NVIDIA cards leave it empty. */
|
|
public var arch: String?
|
|
/** MemoryTotal is the card's VRAM in the units the host reported it in (\"122880 MiB\") — a display string, not a byte count. On a unified part it is the shared CPU/GPU pool, so it is not memory reserved for the GPU. */
|
|
public var memoryTotal: String?
|
|
/** Name is the card's model exactly as its own tooling named it (\"NVIDIA GB10\"), never normalized — an operator matches what they see here against what nvidia-smi tells them on the box. */
|
|
public var name: String?
|
|
/** Unified reports that CPU and GPU share one memory pool (an APU or SoC), so MemoryTotal is not private to the GPU and the host competes for it. */
|
|
public var unified: Bool?
|
|
|
|
public init(arch: String? = nil, memoryTotal: String? = nil, name: String? = nil, unified: Bool? = nil) {
|
|
self.arch = arch
|
|
self.memoryTotal = memoryTotal
|
|
self.name = name
|
|
self.unified = unified
|
|
}
|
|
|
|
public enum CodingKeys: String, CodingKey, CaseIterable {
|
|
case arch
|
|
case memoryTotal
|
|
case name
|
|
case unified
|
|
}
|
|
|
|
// Encodable protocol methods
|
|
|
|
public func encode(to encoder: Encoder) throws {
|
|
var container = encoder.container(keyedBy: CodingKeys.self)
|
|
try container.encodeIfPresent(arch, forKey: .arch)
|
|
try container.encodeIfPresent(memoryTotal, forKey: .memoryTotal)
|
|
try container.encodeIfPresent(name, forKey: .name)
|
|
try container.encodeIfPresent(unified, forKey: .unified)
|
|
}
|
|
}
|
|
|