opendc icon indicating copy to clipboard operation
opendc copied to clipboard

Support independent CPU and GPU workloads on the same node

Open sacheendra opened this issue 1 year ago • 1 comments

Summary

Worklaods can now run CPU and GPU tasks on each host. The caveat is that the fragments for these tasks need to be independent.

Implementation Notes :hammer_and_pick:

GPU is called accel in most places because CPU and GPU only differ by one letter, which can lead to more programming errors. Using accel instead of GPU guards against that.

The fragments file can now have GPU fragments. These fragments have the is_gpu column set to true. When the flag is set the cpu_usage column is instead used as GPU usage. The topology now has accel and accelPowerModel fields. The options for these are the same as those for the cpu and cpuPowerModel fields. Check gpu/single_1_2000.json topology file in experiments-base test resources for an example.

The GPU (accel) implementation uses many classes with CPU in the name, as the required parameters are the same. For example, CpuPowerModel, HostCpuStats, etc. We can rename them to generalize better in the future.

External Dependencies :four_leaf_clover:

Breaking API Changes :warning:

Simply specify none (N/A) if not applicable.

sacheendra avatar Apr 05 '25 00:04 sacheendra

Codecov Report

Attention: Patch coverage is 77.07317% with 94 lines in your changes missing coverage. Please review.

Project coverage is 54.80%. Comparing base (3a370ec) to head (d574070). Report is 1 commits behind head on master.

Files with missing lines Patch % Lines
.../java/org/opendc/simulator/compute/gpu/SimGpu.java 78.48% 17 Missing :warning:
...simulator/compute/machine/PerformanceCounters.java 55.88% 15 Missing :warning:
...lator/compute/workload/trace/SimTraceWorkload.java 81.01% 5 Missing and 10 partials :warning:
...ndc/simulator/compute/workload/VirtualMachine.java 79.03% 2 Missing and 11 partials :warning:
.../main/kotlin/org/opendc/web/runner/OpenDCRunner.kt 0.00% 12 Missing :warning:
...g/opendc/simulator/compute/machine/SimMachine.java 60.00% 6 Missing :warning:
...imulator/compute/workload/trace/TraceWorkload.java 58.33% 5 Missing :warning:
...g/opendc/compute/workload/ComputeWorkloadLoader.kt 0.00% 4 Missing :warning:
...ulator/telemetry/table/task/TaskTableReaderImpl.kt 60.00% 2 Missing :warning:
...otlin/org/opendc/compute/simulator/host/SimHost.kt 87.50% 0 Missing and 1 partial :warning:
... and 4 more
Additional details and impacted files
@@              Coverage Diff              @@
##             master     #331       +/-   ##
=============================================
+ Coverage          0   54.80%   +54.80%     
- Complexity        0       52       +52     
=============================================
  Files             0      340      +340     
  Lines             0    11505    +11505     
  Branches          0     1139     +1139     
=============================================
+ Hits              0     6305     +6305     
- Misses            0     4845     +4845     
- Partials          0      355      +355     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

:rocket: New features to boost your workflow:
  • :snowflake: Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • :package: JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

codecov[bot] avatar Apr 05 '25 00:04 codecov[bot]