Skip to content

Support independent CPU and GPU workloads on the same node #331

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 9 commits into
base: master
Choose a base branch
from

Conversation

sacheendra
Copy link
Contributor

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 ⚒️

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 🍀

Breaking API Changes ⚠️

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

Copy link

codecov bot commented Apr 5, 2025

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 ⚠️
...simulator/compute/machine/PerformanceCounters.java 55.88% 15 Missing ⚠️
...lator/compute/workload/trace/SimTraceWorkload.java 81.01% 5 Missing and 10 partials ⚠️
...ndc/simulator/compute/workload/VirtualMachine.java 79.03% 2 Missing and 11 partials ⚠️
.../main/kotlin/org/opendc/web/runner/OpenDCRunner.kt 0.00% 12 Missing ⚠️
...g/opendc/simulator/compute/machine/SimMachine.java 60.00% 6 Missing ⚠️
...imulator/compute/workload/trace/TraceWorkload.java 58.33% 5 Missing ⚠️
...g/opendc/compute/workload/ComputeWorkloadLoader.kt 0.00% 4 Missing ⚠️
...ulator/telemetry/table/task/TaskTableReaderImpl.kt 60.00% 2 Missing ⚠️
...otlin/org/opendc/compute/simulator/host/SimHost.kt 87.50% 0 Missing and 1 partial ⚠️
... 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     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant