Skip to content

Commit

Permalink
fix when to send vm gpu struct
Browse files Browse the repository at this point in the history
  • Loading branch information
sflow committed Aug 28, 2020
1 parent 174025b commit 501c6cd
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/Linux/mod_nvml.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,8 @@ extern "C" {
&& ps->poller->userData) {
HSPVMState *vm = (HSPVMState *)ps->poller->userData;
if(vm
&& vm->gpus) {
&& vm->gpus
&& UTArrayN(vm->gpus) > 0) {
myDebug(2, "nvml: evt_vm_cs() %u vm->gpus", UTArrayN(vm->gpus));
// VM was assigned one or more GPU devices
SFLHost_gpu_nvml *nvml = init_gpu_nvml(&mdata->nvmlElem);
Expand Down

0 comments on commit 501c6cd

Please sign in to comment.