Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
G
gpucloudsim
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
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
LPDS
gpucloudsim
Commits
189e9254
Commit
189e9254
authored
6 years ago
by
Ahmad Siavashi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
finished. untested yet
parent
bfeda768
No related merge requests found
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
108 additions
and
76 deletions
+108
-76
VgpuScheduler.java
...rc/main/java/org/cloudbus/cloudsim/gpu/VgpuScheduler.java
+7
-10
VideoCardAllocationPolicy.java
...us/cloudsim/gpu/allocation/VideoCardAllocationPolicy.java
+5
-5
VideoCardAllocationPolicyLeastLoad.java
...im/gpu/allocation/VideoCardAllocationPolicyLeastLoad.java
+5
-5
RemoteGpuVmAllocationPolicyFirstFit.java
...udsim/gpu/remote/RemoteGpuVmAllocationPolicyFirstFit.java
+28
-12
RemoteGpuVmAllocationPolicyLeastLoad.java
...dsim/gpu/remote/RemoteGpuVmAllocationPolicyLeastLoad.java
+59
-35
PgpuSelectionPolicyLeastLoad.java
.../cloudsim/gpu/selection/PgpuSelectionPolicyLeastLoad.java
+4
-9
No files found.
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/gpu/VgpuScheduler.java
View file @
189e9254
...
@@ -143,25 +143,22 @@ public abstract class VgpuScheduler {
...
@@ -143,25 +143,22 @@ public abstract class VgpuScheduler {
}
}
/**
/**
* Returns
pGPUs allocated memories in ascending order
.
* Returns
the available memory for all on-board pGPUs
.
*/
*/
public
Map
<
Pgpu
,
Integer
>
getPgpusA
llocated
Memory
()
{
public
Map
<
Pgpu
,
Integer
>
getPgpusA
vailable
Memory
()
{
Map
<
Pgpu
,
Integer
>
pgpusA
llocated
Memory
=
new
HashMap
<>();
Map
<
Pgpu
,
Integer
>
pgpusA
vailable
Memory
=
new
HashMap
<>();
for
(
Pgpu
pgpu
:
getPgpuList
())
{
for
(
Pgpu
pgpu
:
getPgpuList
())
{
Integer
allocatedMemory
=
0
;
Integer
availableMemory
=
pgpu
.
getGddramProvisioner
().
getAvailableGddram
();
for
(
Vgpu
vgpu
:
getPgpuVgpuMap
().
get
(
pgpu
))
{
pgpusAvailableMemory
.
put
(
pgpu
,
availableMemory
);
allocatedMemory
+=
vgpu
.
getGddram
();
}
}
pgpusAllocatedMemory
.
put
(
pgpu
,
allocatedMemory
);
return
pgpusAvailableMemory
;
}
return
pgpusAllocatedMemory
;
}
}
/**
/**
* Returns maximum free memory on GPUs. Assuming all on-board GPUs are the same.
* Returns maximum free memory on GPUs. Assuming all on-board GPUs are the same.
*/
*/
public
int
getMaxFreeMemory
()
{
public
int
getMaxFreeMemory
()
{
Integer
minAllocatedMemory
=
Collections
.
min
(
getPgpusA
llocated
Memory
().
values
());
Integer
minAllocatedMemory
=
Collections
.
min
(
getPgpusA
vailable
Memory
().
values
());
int
maxFreeMemory
=
getPgpuList
().
get
(
0
).
getGddramProvisioner
().
getGddram
()
-
minAllocatedMemory
;
int
maxFreeMemory
=
getPgpuList
().
get
(
0
).
getGddramProvisioner
().
getGddram
()
-
minAllocatedMemory
;
return
maxFreeMemory
;
return
maxFreeMemory
;
}
}
...
...
This diff is collapsed.
Click to expand it.
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/gpu/allocation/VideoCardAllocationPolicy.java
View file @
189e9254
...
@@ -35,13 +35,13 @@ public abstract class VideoCardAllocationPolicy {
...
@@ -35,13 +35,13 @@ public abstract class VideoCardAllocationPolicy {
/**
/**
* Return allocated memory of every video card's least loaded GPU.
* Return allocated memory of every video card's least loaded GPU.
*/
*/
public
Map
<
VideoCard
,
Integer
>
getVideoCardsA
llocated
Memory
(){
public
Map
<
VideoCard
,
Integer
>
getVideoCardsA
vailable
Memory
(){
Map
<
VideoCard
,
Integer
>
videoCardsA
llocated
Memory
=
new
HashMap
<>();
Map
<
VideoCard
,
Integer
>
videoCardsA
vailable
Memory
=
new
HashMap
<>();
for
(
VideoCard
videoCard
:
getVideoCards
())
{
for
(
VideoCard
videoCard
:
getVideoCards
())
{
Integer
allocatedMemoryPgpu
=
Collections
.
min
(
videoCard
.
getVgpuScheduler
().
getPgpusAllocated
Memory
().
values
());
Integer
pgpuAvailableMemory
=
Collections
.
min
(
videoCard
.
getVgpuScheduler
().
getPgpusAvailable
Memory
().
values
());
videoCardsA
llocatedMemory
.
put
(
videoCard
,
allocatedMemoryPgpu
);
videoCardsA
vailableMemory
.
put
(
videoCard
,
pgpuAvailableMemory
);
}
}
return
videoCardsA
llocated
Memory
;
return
videoCardsA
vailable
Memory
;
}
}
/**
/**
...
...
This diff is collapsed.
Click to expand it.
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/gpu/allocation/VideoCardAllocationPolicyLeastLoad.java
View file @
189e9254
...
@@ -48,11 +48,11 @@ public class VideoCardAllocationPolicyLeastLoad extends VideoCardAllocationPolic
...
@@ -48,11 +48,11 @@ public class VideoCardAllocationPolicyLeastLoad extends VideoCardAllocationPolic
VideoCard
videoCard
=
Collections
.
min
(
candidates
,
new
Comparator
<
VideoCard
>()
{
VideoCard
videoCard
=
Collections
.
min
(
candidates
,
new
Comparator
<
VideoCard
>()
{
@Override
@Override
public
int
compare
(
VideoCard
videoCard1
,
VideoCard
videoCard2
)
{
public
int
compare
(
VideoCard
videoCard1
,
VideoCard
videoCard2
)
{
Integer
minAllocatedMemoryVideoCard1
=
Collections
Integer
videoCard1maxAvailableMemory
=
Collections
.
m
in
(
videoCard1
.
getVgpuScheduler
().
getPgpusAllocated
Memory
().
values
());
.
m
ax
(
videoCard1
.
getVgpuScheduler
().
getPgpusAvailable
Memory
().
values
());
Integer
minAllocatedMemoryVideoCard2
=
Collections
Integer
videoCard2maxAvailableMemory
=
Collections
.
m
in
(
videoCard2
.
getVgpuScheduler
().
getPgpusAllocated
Memory
().
values
());
.
m
ax
(
videoCard2
.
getVgpuScheduler
().
getPgpusAvailable
Memory
().
values
());
return
Integer
.
compare
(
minAllocatedMemoryVideoCard1
,
minAllocatedMemoryVideoCard2
);
return
Integer
.
compare
(
videoCard1maxAvailableMemory
,
videoCard2maxAvailableMemory
);
}
}
});
});
// Allocate the given vGPU on the selected video card
// Allocate the given vGPU on the selected video card
...
...
This diff is collapsed.
Click to expand it.
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/gpu/remote/RemoteGpuVmAllocationPolicyFirstFit.java
View file @
189e9254
...
@@ -9,6 +9,7 @@ import org.cloudbus.cloudsim.Host;
...
@@ -9,6 +9,7 @@ import org.cloudbus.cloudsim.Host;
import
org.cloudbus.cloudsim.Log
;
import
org.cloudbus.cloudsim.Log
;
import
org.cloudbus.cloudsim.Vm
;
import
org.cloudbus.cloudsim.Vm
;
import
org.cloudbus.cloudsim.core.CloudSim
;
import
org.cloudbus.cloudsim.core.CloudSim
;
import
org.cloudbus.cloudsim.gpu.GpuHost
;
import
org.cloudbus.cloudsim.gpu.GpuVm
;
import
org.cloudbus.cloudsim.gpu.GpuVm
;
import
org.cloudbus.cloudsim.gpu.GpuVmAllocationPolicySimple
;
import
org.cloudbus.cloudsim.gpu.GpuVmAllocationPolicySimple
;
import
org.cloudbus.cloudsim.gpu.Vgpu
;
import
org.cloudbus.cloudsim.gpu.Vgpu
;
...
@@ -23,8 +24,8 @@ import org.cloudbus.cloudsim.gpu.power.PowerGpuHost;
...
@@ -23,8 +24,8 @@ import org.cloudbus.cloudsim.gpu.power.PowerGpuHost;
*/
*/
public
class
RemoteGpuVmAllocationPolicyFirstFit
extends
GpuVmAllocationPolicySimple
{
public
class
RemoteGpuVmAllocationPolicyFirstFit
extends
GpuVmAllocationPolicySimple
{
private
List
<
PowerGpuHost
>
gpuHosts
;
private
List
<
GpuHost
>
gpuHostList
;
private
Map
<
Vgpu
,
Remote
GpuHost
>
remoteVgpuHosts
;
private
Map
<
Vgpu
,
GpuHost
>
remoteVgpuHosts
;
/**
/**
* This class extends {@link GpuVmAllocationPolicySimple} to add support for GPU
* This class extends {@link GpuVmAllocationPolicySimple} to add support for GPU
...
@@ -35,7 +36,7 @@ public class RemoteGpuVmAllocationPolicyFirstFit extends GpuVmAllocationPolicySi
...
@@ -35,7 +36,7 @@ public class RemoteGpuVmAllocationPolicyFirstFit extends GpuVmAllocationPolicySi
public
RemoteGpuVmAllocationPolicyFirstFit
(
List
<?
extends
Host
>
list
)
{
public
RemoteGpuVmAllocationPolicyFirstFit
(
List
<?
extends
Host
>
list
)
{
super
(
list
);
super
(
list
);
setRemoteVgpuHosts
(
new
HashMap
<>());
setRemoteVgpuHosts
(
new
HashMap
<>());
setGpuHost
s
(
new
ArrayList
<>());
setGpuHost
List
(
new
ArrayList
<>());
updateGpuHosts
(
getHostList
());
updateGpuHosts
(
getHostList
());
}
}
...
@@ -56,6 +57,7 @@ public class RemoteGpuVmAllocationPolicyFirstFit extends GpuVmAllocationPolicySi
...
@@ -56,6 +57,7 @@ public class RemoteGpuVmAllocationPolicyFirstFit extends GpuVmAllocationPolicySi
+
", 'host': "
+
host
.
getId
()
+
"}"
);
+
", 'host': "
+
host
.
getId
()
+
"}"
);
return
true
;
return
true
;
}
}
// else if it has a remote vGPU, then
if
(
allocateRemoteVgpu
(
vgpu
))
{
if
(
allocateRemoteVgpu
(
vgpu
))
{
getVmTable
().
put
(
vm
.
getUid
(),
host
);
getVmTable
().
put
(
vm
.
getUid
(),
host
);
Log
.
formatLine
(
"%.2f: VM #"
+
vm
.
getId
()
+
" has been allocated to the host #"
+
host
.
getId
(),
Log
.
formatLine
(
"%.2f: VM #"
+
vm
.
getId
()
+
" has been allocated to the host #"
+
host
.
getId
(),
...
@@ -73,11 +75,14 @@ public class RemoteGpuVmAllocationPolicyFirstFit extends GpuVmAllocationPolicySi
...
@@ -73,11 +75,14 @@ public class RemoteGpuVmAllocationPolicyFirstFit extends GpuVmAllocationPolicySi
// Allocates a remote vGPU on a GPU-equipped host
// Allocates a remote vGPU on a GPU-equipped host
protected
boolean
allocateRemoteVgpu
(
Vgpu
vgpu
)
{
protected
boolean
allocateRemoteVgpu
(
Vgpu
vgpu
)
{
// if Vm has a remote Vgpu
// if Vm has a remote Vgpu
for
(
PowerGpuHost
gpuHost
:
getGpuHosts
())
{
for
(
GpuHost
gpuHost
:
getGpuHostList
())
{
boolean
isVgpuAllocated
=
gpuHost
.
getVideoCardAllocationPolicy
().
allocate
(
vgpu
,
vgpu
.
getPCIeBw
());
boolean
isVgpuAllocated
=
gpuHost
.
getVideoCardAllocationPolicy
().
allocate
(
vgpu
,
vgpu
.
getPCIeBw
());
getRemoteVgpuHosts
().
put
(
vgpu
,
gpuHost
);
if
(
isVgpuAllocated
)
{
if
(
isVgpuAllocated
)
{
Log
.
formatLine
(
"%.2f: Vgpu of VM #"
+
vgpu
.
getVm
().
getId
()
+
" has been allocated to the host #"
Log
.
formatLine
(
"%.2f: Vgpu of VM #"
+
vgpu
.
getVm
().
getId
()
+
" has been allocated to the host #"
+
gpuHost
.
getId
(),
CloudSim
.
clock
());
+
gpuHost
.
getId
(),
CloudSim
.
clock
());
Log
.
printLine
(
"{'clock': "
+
CloudSim
.
clock
()
+
", 'event': 'vgpu allocation', 'vm': "
+
vgpu
.
getVm
().
getId
()
+
", 'host': "
+
gpuHost
.
getId
()
+
"}"
);
return
true
;
return
true
;
}
}
}
}
...
@@ -93,27 +98,38 @@ public class RemoteGpuVmAllocationPolicyFirstFit extends GpuVmAllocationPolicySi
...
@@ -93,27 +98,38 @@ public class RemoteGpuVmAllocationPolicyFirstFit extends GpuVmAllocationPolicySi
// Add GPU-equipped hosts
// Add GPU-equipped hosts
protected
void
updateGpuHosts
(
List
<
PowerGpuHost
>
hosts
)
{
protected
void
updateGpuHosts
(
List
<
PowerGpuHost
>
hosts
)
{
getGpuHost
s
().
clear
();
getGpuHost
List
().
clear
();
for
(
PowerGpuHost
host
:
hosts
)
{
for
(
PowerGpuHost
host
:
hosts
)
{
if
(
host
.
getVideoCardAllocationPolicy
()
!=
null
)
{
if
(
host
.
getVideoCardAllocationPolicy
()
!=
null
)
{
getGpuHost
s
().
add
(
host
);
getGpuHost
List
().
add
(
host
);
}
}
}
}
}
}
public
List
<
PowerGpuHost
>
getGpuHosts
()
{
@Override
return
gpuHosts
;
public
void
deallocateHostForVm
(
Vm
vm
)
{
super
.
deallocateHostForVm
(
vm
);
Vgpu
vgpu
=
((
GpuVm
)
vm
).
getVgpu
();
if
(
vgpu
==
null
||
!
isVgpuRemote
(
vgpu
))
{
return
;
}
getRemoteVgpuHosts
().
get
(
vgpu
).
getVideoCardAllocationPolicy
().
deallocate
(
vgpu
);
getRemoteVgpuHosts
().
remove
(
vgpu
);
}
public
List
<
GpuHost
>
getGpuHostList
()
{
return
gpuHostList
;
}
}
protected
void
setGpuHost
s
(
List
<
Power
GpuHost
>
gpuHosts
)
{
protected
void
setGpuHost
List
(
List
<
GpuHost
>
gpuHosts
)
{
this
.
gpuHost
s
=
gpuHosts
;
this
.
gpuHost
List
=
gpuHosts
;
}
}
public
Map
<
Vgpu
,
Remote
GpuHost
>
getRemoteVgpuHosts
()
{
public
Map
<
Vgpu
,
GpuHost
>
getRemoteVgpuHosts
()
{
return
remoteVgpuHosts
;
return
remoteVgpuHosts
;
}
}
protected
void
setRemoteVgpuHosts
(
Map
<
Vgpu
,
Remote
GpuHost
>
remoteVgpuHosts
)
{
protected
void
setRemoteVgpuHosts
(
Map
<
Vgpu
,
GpuHost
>
remoteVgpuHosts
)
{
this
.
remoteVgpuHosts
=
remoteVgpuHosts
;
this
.
remoteVgpuHosts
=
remoteVgpuHosts
;
}
}
...
...
This diff is collapsed.
Click to expand it.
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/gpu/remote/RemoteGpuVmAllocationPolicyLeastLoad.java
View file @
189e9254
...
@@ -37,44 +37,68 @@ public class RemoteGpuVmAllocationPolicyLeastLoad extends RemoteGpuVmAllocationP
...
@@ -37,44 +37,68 @@ public class RemoteGpuVmAllocationPolicyLeastLoad extends RemoteGpuVmAllocationP
@Override
@Override
public
boolean
allocateHostForVm
(
Vm
vm
)
{
public
boolean
allocateHostForVm
(
Vm
vm
)
{
GpuVm
gpuVm
=
(
GpuVm
)
vm
;
Vgpu
vgpu
=
((
GpuVm
)
vm
).
getVgpu
();
if
(
gpuVm
.
getVgpu
()
!=
null
)
{
if
(
vgpu
==
null
)
{
sortHosts
();
for
(
Host
host
:
getHostList
())
{
boolean
result
=
host
.
vmCreate
(
vm
);
if
(
result
)
{
getVmTable
().
put
(
vm
.
getUid
(),
host
);
Log
.
formatLine
(
"%.2f: VM #"
+
vm
.
getId
()
+
" has been allocated to the host #"
+
host
.
getId
(),
CloudSim
.
clock
());
Log
.
printLine
(
"{'clock': "
+
CloudSim
.
clock
()
+
", 'event': 'vm allocation', 'vm': "
+
vm
.
getId
()
+
", 'host': "
+
host
.
getId
()
+
"}"
);
return
true
;
}
}
return
super
.
allocateHostForVm
(
vm
);
}
}
}
else
{
@Override
// Sort GPU-equipped hosts based on video cards' available memory in descending
public
boolean
allocateHostForVm
(
Vm
vm
,
Host
host
)
{
// order.
GpuVm
gpuVm
=
(
GpuVm
)
vm
;
sortGpuHosts
();
if
(
gpuVm
.
getVgpu
()
!=
null
)
{
if
(!
isVgpuRemote
(
vgpu
))
{
sortHosts
();
for
(
Host
host
:
getGpuHostList
())
{
boolean
result
=
host
.
vmCreate
(
vm
);
if
(
result
)
{
getVmTable
().
put
(
vm
.
getUid
(),
host
);
Log
.
formatLine
(
"%.2f: VM #"
+
vm
.
getId
()
+
" has been allocated to the host #"
+
host
.
getId
(),
CloudSim
.
clock
());
Log
.
printLine
(
"{'clock': "
+
CloudSim
.
clock
()
+
", 'event': 'vm allocation', 'vm': "
+
vm
.
getId
()
+
", 'host': "
+
host
.
getId
()
+
"}"
);
return
true
;
}
}
return
super
.
allocateHostForVm
(
vm
,
host
);
}
}
return
false
;
protected
void
sortHosts
()
{
}
else
{
Collections
.
sort
(
getHostList
(),
new
Comparator
<
GpuHost
>()
{
for
(
Host
host
:
getGpuHostList
())
{
@Override
boolean
result
=
host
.
vmCreate
(
vm
);
public
int
compare
(
GpuHost
arg0
,
GpuHost
arg1
)
{
if
(
result
)
{
// TODO
result
=
allocateRemoteVgpu
(
vgpu
);
return
0
;
if
(
result
)
{
getVmTable
().
put
(
vm
.
getUid
(),
host
);
Log
.
formatLine
(
"%.2f: VM #"
+
vm
.
getId
()
+
" has been allocated to the host #"
+
host
.
getId
(),
CloudSim
.
clock
());
Log
.
printLine
(
"{'clock': "
+
CloudSim
.
clock
()
+
", 'event': 'vm allocation', 'vm': "
+
vm
.
getId
()
+
", 'host': "
+
host
.
getId
()
+
"}"
);
return
true
;
}
getRemoteVgpuHosts
().
get
(
vgpu
).
getVideoCardAllocationPolicy
().
deallocate
(
vgpu
);
}
}
});
}
}
}
return
false
;
}
}
@Override
protected
void
sortGpuHosts
()
{
protected
boolean
allocateRemoteVgpu
(
Vgpu
vgpu
)
{
Collections
.
sort
(
getGpuHostList
(),
Collections
.
reverseOrder
(
new
Comparator
<
GpuHost
>()
{
Collections
.
sort
(
getGpuHosts
(),
new
Comparator
<
PowerGpuHost
>()
{
public
int
compare
(
GpuHost
gpuHost1
,
GpuHost
gpuHost2
)
{
public
int
compare
(
PowerGpuHost
gpuHost1
,
PowerGpuHost
gpuHost2
)
{
Integer
host1MaxAvailableMemory
=
Collections
Integer
minAllocatedMemoryHost1
=
Collections
.
max
(
gpuHost1
.
getVideoCardAllocationPolicy
().
getVideoCardsAvailableMemory
().
values
());
.
min
(
gpuHost1
.
getVideoCardAllocationPolicy
().
getVideoCardsAllocatedMemory
().
values
());
Integer
host2MaxAvailableMemory
=
Collections
Integer
minAllocatedMemoryHost2
=
Collections
.
max
(
gpuHost2
.
getVideoCardAllocationPolicy
().
getVideoCardsAvailableMemory
().
values
());
.
min
(
gpuHost2
.
getVideoCardAllocationPolicy
().
getVideoCardsAllocatedMemory
().
values
());
return
Integer
.
compare
(
host1MaxAvailableMemory
,
host2MaxAvailableMemory
);
return
Integer
.
compare
(
minAllocatedMemoryHost1
,
minAllocatedMemoryHost2
);
};
};
});
}));
return
super
.
allocateRemoteVgpu
(
vgpu
);
}
}
}
}
This diff is collapsed.
Click to expand it.
modules/cloudsim/src/main/java/org/cloudbus/cloudsim/gpu/selection/PgpuSelectionPolicyLeastLoad.java
View file @
189e9254
/**
*
*/
package
org
.
cloudbus
.
cloudsim
.
gpu
.
selection
;
package
org
.
cloudbus
.
cloudsim
.
gpu
.
selection
;
import
java.util.Collections
;
import
java.util.Collections
;
...
@@ -12,7 +9,7 @@ import org.cloudbus.cloudsim.gpu.VgpuScheduler;
...
@@ -12,7 +9,7 @@ import org.cloudbus.cloudsim.gpu.VgpuScheduler;
/**
/**
* {@link PgpuSelectionPolicyLeastLoad} implements {@link PgpuSelectionPolicy}
* {@link PgpuSelectionPolicyLeastLoad} implements {@link PgpuSelectionPolicy}
* and selects the Pgpu with the
least allocated
memory.
* and selects the Pgpu with the
maximum available
memory.
*
*
* @author Ahmad Siavashi
* @author Ahmad Siavashi
*
*
...
@@ -37,11 +34,9 @@ public class PgpuSelectionPolicyLeastLoad implements PgpuSelectionPolicy {
...
@@ -37,11 +34,9 @@ public class PgpuSelectionPolicyLeastLoad implements PgpuSelectionPolicy {
return
Collections
.
min
(
pgpuList
,
new
Comparator
<
Pgpu
>()
{
return
Collections
.
min
(
pgpuList
,
new
Comparator
<
Pgpu
>()
{
@Override
@Override
public
int
compare
(
Pgpu
pgpu1
,
Pgpu
pgpu2
)
{
public
int
compare
(
Pgpu
pgpu1
,
Pgpu
pgpu2
)
{
int
pgpu1AllocatedMemory
=
pgpu1
.
getGddramProvisioner
().
getGddram
()
int
pgpu1AvailableMemory
=
pgpu1
.
getGddramProvisioner
().
getAvailableGddram
();
-
pgpu1
.
getGddramProvisioner
().
getAvailableGddram
();
int
pgpu2AvailableMemory
=
pgpu2
.
getGddramProvisioner
().
getAvailableGddram
();
int
pgpu2AllocatedMemory
=
pgpu2
.
getGddramProvisioner
().
getGddram
()
return
Integer
.
compare
(
pgpu1AvailableMemory
,
pgpu2AvailableMemory
);
-
pgpu2
.
getGddramProvisioner
().
getAvailableGddram
();
return
Integer
.
compare
(
pgpu1AllocatedMemory
,
pgpu2AllocatedMemory
);
}
}
});
});
}
}
...
...
This diff is collapsed.
Click to expand it.
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