-
Notifications
You must be signed in to change notification settings - Fork 1k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
move device-sharing logics from predicates to standalone devices plugin #3313
Conversation
nodeMap := ssn.NodeMap | ||
|
||
pCache := predicateCacheNew() | ||
predicate := enablePredicate(pp.pluginArguments) | ||
|
||
// Register event handlers to update task info in PodLister & nodeMap | ||
ssn.AddEventHandler(&framework.EventHandler{ | ||
AllocateFunc: func(event *framework.Event) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be all removed, just remove device related codes, because other parts are needed by predict plugin.
@@ -34,9 +34,10 @@ data: | |||
- name: conformance | |||
- plugins: | |||
- name: drf | |||
- name: predicates |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
predicate is an important and basic plugin, we should not remove it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't remove predicates here, i simply add 'devices' before 'predicates'
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok
@@ -0,0 +1,185 @@ | |||
/* | |||
Copyright 2024 The Kubernetes Authors. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Kubernetes -> Volcano
@@ -227,89 +205,11 @@ func enablePredicate(args framework.Arguments) predicateEnable { | |||
} | |||
|
|||
func (pp *predicatesPlugin) OnSessionOpen(ssn *framework.Session) { | |||
pl := ssn.PodLister |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should not be removed either.
We'd better add some UTs. |
@@ -34,9 +34,10 @@ data: | |||
- name: conformance | |||
- plugins: | |||
- name: drf | |||
- name: predicates | |||
- name: devices |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In each doc, we should support two ways guidance, one is before v1.8.2, and another is after v1.8.2. Old way should be kept.
} | ||
|
||
func (pp *priorityPlugin) Name() string { | ||
func (pp *devicesPlugin) Name() string { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pp -> dp
Signed-off-by: limengxuan <limengxuan@4paradigm.com>
9540c6a
to
974fe16
Compare
Signed-off-by: limengxuan <limengxuan@4paradigm.com>
@@ -18,6 +18,35 @@ After installed, update the scheduler configuration: | |||
kubectl edit cm -n volcano-system volcano-scheduler-configmap | |||
``` | |||
|
|||
For volcano v1.8.2+(v1.8.2 included), use the following configMap |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, seems v1.8.2 has not included this feature.
Signed-off-by: limengxuan <limengxuan@4paradigm.com>
limitations under the License. | ||
*/ | ||
|
||
package devices |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
device
is too general. It's not easy to know the function of plugin according to the name. It's better use a specific plugin name, like vgpu
Signed-off-by: limengxuan <limengxuan@4paradigm.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
/lgtm
[APPROVALNOTIFIER] This PR is APPROVED This pull-request has been approved by: william-wang The full list of commands accepted by this bot can be found here. The pull request process is described here
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
In order support other Heterogeneous AI Computing devices, we'd better separate device-sharing logics to a standalone plugin called 'devices'