Skip to content

Commit a2d1a49

Browse files
committed
feat: allow metax GPU graceful checking
If there is no GPU available, continue running. Signed-off-by: Tonghao Zhang <tonghao@bamaicloud.com>
1 parent 0346985 commit a2d1a49

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/metrics/metax_gpu.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import (
3030
"huatuo-bamai/internal/log"
3131
"huatuo-bamai/pkg/metric"
3232
"huatuo-bamai/pkg/tracing"
33+
"huatuo-bamai/pkg/types"
3334
)
3435

3536
func init() {
@@ -41,7 +42,7 @@ type metaxGpuCollector struct{}
4142
func newMetaxGpuCollector() (*tracing.EventTracingAttr, error) {
4243
// Init MetaX SML lib
4344
if err := sml.Init(); err != nil {
44-
return nil, fmt.Errorf("failed to init sml: %w", err)
45+
return nil, types.ErrNotSupported
4546
}
4647

4748
return &tracing.EventTracingAttr{

0 commit comments

Comments
 (0)