Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
power-node
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Odysseus
power-node
Commits
82cb1d3f
Commit
82cb1d3f
authored
May 24, 2024
by
duanjinfei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update nil ponit
parent
1a00717c
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
msg_handler.go
nm/msg_handler.go
+6
-0
msg_resp.go
nm/msg_resp.go
+3
-0
No files found.
nm/msg_handler.go
View file @
82cb1d3f
...
@@ -177,6 +177,9 @@ func (n *NodeManagerHandler) DistributionMsgWorker(nodeManagerMsgChan chan *node
...
@@ -177,6 +177,9 @@ func (n *NodeManagerHandler) DistributionMsgWorker(nodeManagerMsgChan chan *node
HostPort
:
n
.
taskMsgWorker
.
getExternalPort
(),
HostPort
:
n
.
taskMsgWorker
.
getExternalPort
(),
}
}
info
:=
getHardwareInfo
()
info
:=
getHardwareInfo
()
if
info
==
nil
{
continue
}
gpu
:=
info
.
GPU
gpu
:=
info
.
GPU
isMatch
:=
false
isMatch
:=
false
for
_
,
gpuInfo
:=
range
gpu
{
for
_
,
gpuInfo
:=
range
gpu
{
...
@@ -320,6 +323,9 @@ func (n *NodeManagerHandler) MonitorImageOp(op *nodemanagerV2.ModelOperate) {
...
@@ -320,6 +323,9 @@ func (n *NodeManagerHandler) MonitorImageOp(op *nodemanagerV2.ModelOperate) {
return
return
}
}
info
:=
getHardwareInfo
()
info
:=
getHardwareInfo
()
if
info
==
nil
{
continue
}
memIsChange
:=
false
memIsChange
:=
false
for
_
,
gpuInfo
:=
range
info
.
GPU
{
for
_
,
gpuInfo
:=
range
info
.
GPU
{
if
gpuInfo
.
Seq
==
model
.
GpuSeq
{
if
gpuInfo
.
Seq
==
model
.
GpuSeq
{
...
...
nm/msg_resp.go
View file @
82cb1d3f
...
@@ -357,6 +357,9 @@ func DelModelRunningResp(params ...interface{}) *nodemanagerV2.WorkerMessage {
...
@@ -357,6 +357,9 @@ func DelModelRunningResp(params ...interface{}) *nodemanagerV2.WorkerMessage {
func
getHardwareInfo
()
*
nodemanagerV2
.
HardwareInfo
{
func
getHardwareInfo
()
*
nodemanagerV2
.
HardwareInfo
{
hardwareInfo
:=
utils
.
GetHardwareInfo
(
conf
.
GetConfig
()
.
HardwareUrl
)
hardwareInfo
:=
utils
.
GetHardwareInfo
(
conf
.
GetConfig
()
.
HardwareUrl
)
if
hardwareInfo
==
nil
{
return
nil
}
gpusInfo
:=
make
([]
*
nodemanagerV2
.
GPUInfo
,
0
)
gpusInfo
:=
make
([]
*
nodemanagerV2
.
GPUInfo
,
0
)
var
diskTotal
,
diskFree
int64
var
diskTotal
,
diskFree
int64
for
_
,
disk
:=
range
hardwareInfo
.
Data
.
Disk
{
for
_
,
disk
:=
range
hardwareInfo
.
Data
.
Disk
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment