New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 900285 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Nov 26
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Feature

Blocking:
issue 916647



Sign in to add a comment

Linux Intel GPU swarmed bots don't report GPU driver version in swarming dimensions

Project Member Reported by ynovikov@chromium.org, Oct 30

Issue description

These bots:
https://chromium-swarm.appspot.com/botlist?c=id&c=os&c=task&c=status&c=gpu&c=pool&f=gpu%3AIntel%20Kaby%20Lake%20HD%20Graphics%20630%20(8086%3A5912)&f=os%3AUbuntu&f=pool%3AChrome-GPU&l=100&s=id%3Aasc

This problem would prevent us from creating experimental trybots which can target a specific driver version in order to test a new driver before upgrading the whole fleet.
 
Cc: bsheedy@chromium.org
Labels: -Type-Bug Type-Feature
There's code in Swarming (I don't remember where) that finds the NVIDIA driver version based only on the files installed, not by creating OpenGL contexts.

Ideally we would figure out a way to do the same for Mesa.

Status: Available (was: Untriaged)
There's no generic way to get the GPU driver version on linux, here's the code specifically for nvidia:
https://cs.chromium.org/chromium/infra/luci/appengine/swarming/swarming_bot/api/platforms/linux.py?l=87

Please add the code path that works for your case.
Cc: yang...@intel.com yunchao...@intel.com
Labels: -Restrict-View-Google
Thanks maruel@ for the pointer.

Yang, Yunchao: is it possible to detect the installed Mesa version from looking at files on disk? In the Swarming code it's not possible to create an OpenGL context in order to detect the Mesa or driver version.

Thanks.

Removing restricted view as there's nothing private about this.

Owner: yunchao...@intel.com
Status: Assigned (was: Available)
Yunchao, may I assign this to you to find someone from your team to help with identifying the Mesa version from just the on-disk files? Thanks.

Owner: xinghua....@intel.com
Ken, it is OK. Xinghua will take a look. 
Cc: xinghua....@intel.com
Owner: yang...@intel.com
There is a tool named glxinfo provided by package "mesa-utils", but it needs to create context (I think this is the most official way to get version of Mesa). 
Like maruel@ mentioned above, there is no generic way to get GPU info on Linux. Is your system Ubuntu? If so, we may have some alternatives (Other distributions may have similar method):
1) dpkg -s libgl1-mesa-dri |grep Version
I got "Version: 18.0.5-0ubuntu0~18.04.1" on my machine, while "18.0.5" is the Mesa version.
2) cat /var/lib/dpkg/status |grep -A9 "Package: libgl1-mesa-dri"
I got below output on my machine.
Package: libgl1-mesa-dri
Status: install ok installed
Priority: optional
Section: libs
Installed-Size: 134299
Maintainer: Ubuntu X-SWAT <ubuntu-x@lists.ubuntu.com>
Architecture: amd64
Multi-Arch: same
Source: mesa
Version: 18.0.5-0ubuntu0~18.04.1
I'm fine with dpkg route, make sure to also check it is installed.
yang.gu@: per our concall yesterday, would greatly appreciate it if someone from your team could check out this repository:
https://chromium.googlesource.com/infra/luci/luci-py/

Add the code to appengine/swarming/swarming_bot/api/platforms/linux.py to detect the Mesa version when it's available (please make the code gracefully fall back and return None if anything fails, like _get_nvidia_version() does), and hook it up to get_gpu():
https://cs.chromium.org/chromium/infra/luci/appengine/swarming/swarming_bot/api/platforms/linux.py?l=202

Appreciate your help hooking this up - our team doesn't have any local Linux workstations with Intel GPUs, only ones in the data center, so it'll be much simpler for your team to write and test this locally.

Thanks again.

Comment 9 Deleted

Not sure how to submit the patch to luci-py for review. Let me just upload it here and PTAL. 
0001-Add-Intel-GPU-Mesa-driver-version-on-Ubuntu.patch
1.6 KB Download
Proposed as https://chromium-review.googlesource.com/1349371 with modifications.
Project Member

Comment 12 by bugdroid1@chromium.org, Nov 24

The following revision refers to this bug:
  https://chromium.googlesource.com/infra/luci/luci-py.git/+/d6a0b5a09d7c99ce9bd7e91009147e6cb83e5686

commit d6a0b5a09d7c99ce9bd7e91009147e6cb83e5686
Author: Marc-Antoine Ruel <maruel@chromium.org>
Date: Sat Nov 24 18:47:52 2018

Add Intel GPU Mesa driver version on Ubuntu

As context creation is not allowed, dpkg command is used against key
Intel Mesa driver package to get version information.

Change based on a patch contributed by yang.gu@intel.com

Bug:  900285 
Change-Id: I28a33d4bb0977624b0e5b9646de4c50e29f4fa59
Reviewed-on: https://chromium-review.googlesource.com/c/1349371
Commit-Queue: Marc-Antoine Ruel <maruel@chromium.org>
Reviewed-by: Quinten Yearsley <qyearsley@chromium.org>

[modify] https://crrev.com/d6a0b5a09d7c99ce9bd7e91009147e6cb83e5686/appengine/swarming/swarming_bot/api/platforms/linux.py

This will be live to prod next week.
Status: Fixed (was: Assigned)
Nice, thank you, yang.gu@ and maruel@!
Thank you Yang and Marc-Antoine for adding this information! It will make it much easier to maintain these bots.

Components: Internals>GPU>Testing
Blocking: 916647

Sign in to add a comment