updated octopus cardname
Former-commit-id: a62d3350bd21690be3f75a11bfed6518fc23b0a8
This commit is contained in:
parent
f8a94bb090
commit
99985ec130
|
@ -57,6 +57,9 @@ const (
|
|||
TRAIN_CMD = "cd /code; python train.py"
|
||||
VERSION = "V1"
|
||||
DOMAIN = "http://192.168.242.41:8001/"
|
||||
CAMBRICON_CN = "寒武纪290"
|
||||
ENFLAME_CN = "燧原T20"
|
||||
ILUVATAR_CN = "天数BI-V100"
|
||||
)
|
||||
|
||||
var (
|
||||
|
@ -65,6 +68,11 @@ var (
|
|||
GCU: ENFLAME,
|
||||
BIV100: ILUVATAR,
|
||||
}
|
||||
cardCnMap = map[string]string{
|
||||
MLU: CAMBRICON_CN,
|
||||
GCU: ENFLAME_CN,
|
||||
BIV100: ILUVATAR_CN,
|
||||
}
|
||||
cardTopsMap = map[string]float64{
|
||||
MLU: CAMBRICONMLU290,
|
||||
GCU: EnflameT20,
|
||||
|
@ -742,7 +750,7 @@ func setResourceIdByCard(option *option.AiOption, specs *octopus.GetResourceSpec
|
|||
if spec.Price == 1 {
|
||||
ns := strings.Split(spec.Name, COMMA)
|
||||
cardSpecs := strings.Split(ns[0], STAR)
|
||||
if cardSpecs[1] == computeCard {
|
||||
if cardSpecs[1] == cardCnMap[computeCard] {
|
||||
option.ResourceId = spec.Id
|
||||
option.ComputeCard = computeCard
|
||||
return nil
|
||||
|
@ -758,7 +766,7 @@ func setResourceIdByCard(option *option.AiOption, specs *octopus.GetResourceSpec
|
|||
if spec.Price == 1 {
|
||||
ns := strings.Split(spec.Name, COMMA)
|
||||
cardSpecs := strings.Split(ns[0], STAR)
|
||||
if cardSpecs[1] == computeCard {
|
||||
if cardSpecs[1] == cardCnMap[computeCard] {
|
||||
option.ResourceId = spec.Id
|
||||
option.ComputeCard = computeCard
|
||||
return nil
|
||||
|
@ -772,7 +780,7 @@ func setResourceIdByCard(option *option.AiOption, specs *octopus.GetResourceSpec
|
|||
continue
|
||||
}
|
||||
cardSpecs := strings.Split(ns[0], STAR)
|
||||
if cardSpecs[1] != computeCard {
|
||||
if cardSpecs[1] != cardCnMap[computeCard] {
|
||||
continue
|
||||
}
|
||||
s, err := strconv.ParseFloat(cardSpecs[0], 64)
|
||||
|
|
Loading…
Reference in New Issue