summaryrefslogtreecommitdiff
path: root/opendc-compute/opendc-compute-topology/src
diff options
context:
space:
mode:
authorNiels Thiele <noleu66@posteo.net>2025-07-15 11:29:47 +0200
committerGitHub <noreply@github.com>2025-07-15 11:29:47 +0200
commitb2dc97dc84f56174ede9f273999ade2ed059d431 (patch)
tree1b5d6d775890375f46b533c7aa78e492a88afc3f /opendc-compute/opendc-compute-topology/src
parent0203254b709614fa732c114aa25916f61b8b3275 (diff)
multi gpu support (#351)
Diffstat (limited to 'opendc-compute/opendc-compute-topology/src')
-rw-r--r--opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/TopologyFactories.kt3
1 files changed, 2 insertions, 1 deletions
diff --git a/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/TopologyFactories.kt b/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/TopologyFactories.kt
index b52608a9..09a8fe64 100644
--- a/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/TopologyFactories.kt
+++ b/opendc-compute/opendc-compute-topology/src/main/kotlin/org/opendc/compute/topology/TopologyFactories.kt
@@ -157,6 +157,7 @@ private fun ClusterJSONSpec.toClusterSpec(): ClusterSpec {
* Helper method to convert a [HostJSONSpec] into a [HostSpec]s.
*/
private var globalCoreId = 0
+private var globalGpuId = 0
private fun HostJSONSpec.toHostSpec(clusterName: String): HostSpec {
val units =
@@ -172,7 +173,7 @@ private fun HostJSONSpec.toHostSpec(clusterName: String): HostSpec {
val gpuUnits =
List(gpu?.count ?: 0) {
GpuModel(
- globalCoreId++,
+ globalGpuId++,
gpu!!.coreCount,
gpu.coreSpeed.toMHz(),
gpu.memoryBandwidth.toKibps(),