Skip to content

Commit

Permalink
Merge pull request #1114 from eero-t/prefix-option
Browse files Browse the repository at this point in the history
Add "prefix" option to GPU plugin for scalability testing
  • Loading branch information
bart0sh authored Aug 26, 2022
2 parents 6347609 + 5666b8f commit 02446fc
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmd/gpu_plugin/gpu_plugin.go
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,12 @@ func (dp *devicePlugin) Allocate(request *pluginapi.AllocateRequest) (*pluginapi
}

func main() {
var opts cliOptions
var (
prefix string
opts cliOptions
)

flag.StringVar(&prefix, "prefix", "", "Prefix for devfs & sysfs paths")
flag.BoolVar(&opts.enableMonitoring, "enable-monitoring", false, "whether to enable 'i915_monitoring' (= all GPUs) resource")
flag.BoolVar(&opts.resourceManagement, "resource-manager", false, "fractional GPU resource management")
flag.IntVar(&opts.sharedDevNum, "shared-dev-num", 1, "number of containers sharing the same GPU device")
Expand All @@ -393,7 +397,7 @@ func main() {

klog.V(1).Infof("GPU device plugin started with %s preferred allocation policy", opts.preferredAllocationPolicy)

plugin := newDevicePlugin(sysfsDrmDirectory, devfsDriDirectory, opts)
plugin := newDevicePlugin(prefix+sysfsDrmDirectory, prefix+devfsDriDirectory, opts)
manager := dpapi.NewManager(namespace, plugin)
manager.Run()
}

0 comments on commit 02446fc

Please sign in to comment.