Documentation
¶
Overview ¶
* GPU instance data is from:https://instances.vantage.sh/ ,Thanks a lot!
Index ¶
- func SetTflopsMapAndInitGPUPricingInfo(ctx context.Context, gpuInfos *[]config.GpuInfo)
- type CompleteGPUInfo
- type GPUNodeInstanceInfoAndPrice
- type PricingProvider
- type StaticPricingProvider
- func (p *StaticPricingProvider) GetGPUCapacityByModel(gpuModel string) (resource.Quantity, resource.Quantity, bool)
- func (p *StaticPricingProvider) GetGPUNodeInstanceTypeInfoByInstance(instanceType string, region string) (types.GPUNodeInstanceInfo, bool)
- func (p *StaticPricingProvider) GetPricing(instanceType string, capacityType tfv1.CapacityTypeEnum, region string) (float64, bool)
- func (p *StaticPricingProvider) GetRegionalGPUNodeInstanceTypes(region string) ([]types.GPUNodeInstanceInfo, bool)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CompleteGPUInfo ¶ added in v1.43.3
CompleteGPUInfo combines GpuInfo with VRAM information from instance data
type GPUNodeInstanceInfoAndPrice ¶
type GPUNodeInstanceInfoAndPrice struct { GPUNodeInstanceInfo types.GPUNodeInstanceInfo // contains filtered or unexported fields }
type PricingProvider ¶
type PricingProvider interface { GetPricing(instanceType string, capacityType tfv1.CapacityTypeEnum, region string) (float64, bool) GetRegionalGPUNodeInstanceTypes(region string) ([]types.GPUNodeInstanceInfo, bool) GetGPUCapacityByModel(gpuModel string) (resource.Quantity, resource.Quantity, bool) }
PricingProvider provides pricing information and calculations for instance types
type StaticPricingProvider ¶
type StaticPricingProvider struct{}
StaticPricingProvider implements PricingProvider using static pricing data Data is now stored in global variables and initialized during package init
func NewStaticPricingProvider ¶
func NewStaticPricingProvider() *StaticPricingProvider
func (*StaticPricingProvider) GetGPUCapacityByModel ¶ added in v1.43.3
func (p *StaticPricingProvider) GetGPUCapacityByModel(gpuModel string) (resource.Quantity, resource.Quantity, bool)
GetGPUCapacityByModel gets the full capacity (TFlops and VRAM) for a GPU model Returns TFlops, VRAM, and whether found
func (*StaticPricingProvider) GetGPUNodeInstanceTypeInfoByInstance ¶
func (p *StaticPricingProvider) GetGPUNodeInstanceTypeInfoByInstance(instanceType string, region string) (types.GPUNodeInstanceInfo, bool)
GetGPUNodeInstanceTypeInfoByInstance gets the gpu info for the instanceType, region
func (*StaticPricingProvider) GetPricing ¶ added in v1.41.0
func (p *StaticPricingProvider) GetPricing(instanceType string, capacityType tfv1.CapacityTypeEnum, region string) (float64, bool)
GetPricing gets the pricing for the instanceType, capacityType
func (*StaticPricingProvider) GetRegionalGPUNodeInstanceTypes ¶ added in v1.41.0
func (p *StaticPricingProvider) GetRegionalGPUNodeInstanceTypes(region string) ([]types.GPUNodeInstanceInfo, bool)
GetRegionalGPUNodeInstanceTypes implements PricingProvider interface