Skip to content
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

gpu_plugin: fractional resource management #638

Merged
merged 3 commits into from
Jun 9, 2021
Merged

Conversation

uniemimu
Copy link
Contributor

@uniemimu uniemimu commented May 21, 2021

Fractional GPU resource management feature

Signed-off-by: Ukri Niemimuukko ukri.niemimuukko@intel.com

@uniemimu uniemimu requested review from rojkov and mythi May 21, 2021 13:34
pkg/controllers/reconciler.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/gpu_plugin.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
pkg/controllers/reconciler.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
@codecov-commenter
Copy link

codecov-commenter commented May 25, 2021

Codecov Report

Merging #638 (96749b8) into main (47f5b34) will increase coverage by 1.33%.
The diff coverage is 75.13%.

❗ Current head 96749b8 differs from pull request most recent head 7739484. Consider uploading reports for the commit 7739484 to get more accurate results
Impacted file tree graph

@@            Coverage Diff             @@
##             main     #638      +/-   ##
==========================================
+ Coverage   57.61%   58.95%   +1.33%     
==========================================
  Files          31       32       +1     
  Lines        2192     2373     +181     
==========================================
+ Hits         1263     1399     +136     
- Misses        855      891      +36     
- Partials       74       83       +9     
Impacted Files Coverage Δ
pkg/deviceplugin/api.go 26.31% <0.00%> (-1.47%) ⬇️
pkg/deviceplugin/server.go 81.94% <33.33%> (-2.23%) ⬇️
pkg/deviceplugin/manager.go 80.76% <50.00%> (-2.91%) ⬇️
cmd/gpu_plugin/gpu_plugin.go 83.67% <75.00%> (-1.33%) ⬇️
cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go 77.92% <77.92%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 47f5b34...7739484. Read the comment docs.

Copy link
Contributor

@rojkov rojkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Maybe it would make sense to move deviceManager to a separate package and to import it in gpu_plugin. This way we could see clearly the interfaces that need to be tested.

pkg/deviceplugin/server.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
@uniemimu uniemimu force-pushed the fractional branch 4 times, most recently from 7ac40ec to d8fbc3f Compare May 25, 2021 17:26
Copy link
Contributor

@rojkov rojkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks like unrelated VPU changes got sneaked into this PR.

pkg/deviceplugin/server.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/gpu_plugin.go Outdated Show resolved Hide resolved
@uniemimu uniemimu force-pushed the fractional branch 3 times, most recently from 12f505e to 1150e33 Compare May 26, 2021 16:06
pkg/deviceplugin/api.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/gpu_plugin.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
Copy link
Contributor

@rojkov rojkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

Now tests are missing. Also it would be nice to add a paragraph about the new optional interface to DEVEL.md.

cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mythi mythi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM too, just a couple of questions and suggestions.

The server Allocate() modifications could go into its own commit.

cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/gpu_plugin.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
Copy link
Contributor

@mythi mythi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM now

cmd/gpu_plugin/gpu_plugin.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/rm/gpu_plugin_resource_manager.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/rm/gpu_plugin_resource_manager_test.go Outdated Show resolved Hide resolved
pkg/deviceplugin/api.go Outdated Show resolved Hide resolved
cmd/gpu_plugin/gpu_plugin.go Show resolved Hide resolved
@uniemimu uniemimu force-pushed the fractional branch 2 times, most recently from 2b99b8d to 81b3d36 Compare June 2, 2021 12:52
@uniemimu uniemimu force-pushed the fractional branch 2 times, most recently from 8c88389 to a1037fd Compare June 2, 2021 17:44
Copy link
Contributor

@rojkov rojkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

Now pkg/deviceplugin needs to be covered. The coverage of this part should be as close to 100% as possible.

DEVEL.md Outdated Show resolved Hide resolved
rojkov
rojkov previously approved these changes Jun 4, 2021
Copy link
Contributor

@rojkov rojkov left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Looks good to me. The PR can be squashed now.

This adds a new optional Allocator interface which allows the
plugins to implement the whole Allocate functionality.

Signed-off-by: Ukri Niemimuukko <ukri.niemimuukko@intel.com>
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@intel.com>
Fractional resource management feature

Signed-off-by: Ukri Niemimuukko <ukri.niemimuukko@intel.com>
Signed-off-by: Dmitry Rozhkov <dmitry.rozhkov@intel.com>
Signed-off-by: Ukri Niemimuukko <ukri.niemimuukko@intel.com>
@uniemimu uniemimu marked this pull request as ready for review June 4, 2021 10:07
@uniemimu uniemimu requested review from bart0sh and kad as code owners June 4, 2021 10:07
@rojkov rojkov merged commit 6aa1a47 into intel:main Jun 9, 2021
@uniemimu uniemimu deleted the fractional branch June 11, 2021 16:08
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.

None yet

4 participants