Closed frenchwr closed 15 hours ago
Hi @frenchwr -- interesting... not sure why the version would show up a 1.0.
. I'll have to get in touch with the Linux NPU guys to understand if this is expected in certain circumstances.
Perhaps we'll need to add a try / except clause to catch an exception and route it through the 'False' path. In your case (on MTL), control should go through the 'False' path, so you can always add a hack for now.. something like:
# if tuple(map(int, version.split('.'))) < tuple(map(int, '1.9.0'.split('.'))):
if False:
print(f"The driver intel_vpu-1.9.0 (or later) needs to be loaded for NPU Turbo (currently {version}). Skipping...")
Let's leave this issue open to track against. Thanks for the report!
Thanks, Ryan
Thanks, @RyanMetcalfeInt8 . We (Canonical) recently demo'd the plugin packaged as a snap on Ubuntu 24.04 with a few hacks (like the one you suggest) and integrated it with a new Intel NPU driver snap: https://github.com/canonical/intel-npu-driver-snap/
We plan to package the plugin properly in the near future so you may start hearing from me more regularly. :)
I'm in touch with the Linux NPU team so will also drop them a note in case they want to chime in here.
Aha got it, very nice. I'll probably integrate some try / catch clauses into main branch here soon -- but if you're in touch with Linux NPU team already, sure, letting them know directly might be the easiest path forward. Happy to revisit this logic... we definitely want to make sure that LNL (Core Ultra series 2) properly detects support for NPU Turbo.
Hi @frenchwr -- quick follow up. Any chance you got in touch with the Linux NPU team? I can poke from my side if needed. For the interim, I'll get a try / except clause added here (sorry for delay on that).
Hi, I'm intel_vpu maintainer. Could you help me understand why you are parsing module version? This is deprecated and will be removed as it is rather meaningless. Most GPU drivers already removed it.
Hi, I'm intel_vpu maintainer. Could you help me understand why you are parsing module version? This is deprecated and will be removed as it is rather meaningless. Most GPU drivers already removed it.
The engineer who implemented it is out of office for a couple more weeks, so it's hard for me to say for sure -- but it's clear that the intent was to use the module version to determine whether the NPU supports NPU Turbo feature.
I do find it odd that for Windows, this is determined using OpenVINO API:
if "windows" in platform.system().lower():
if "NPU" in device and "3720" not in core.get_property('NPU', 'DEVICE_ARCHITECTURE'):
try:
core.set_property(properties={'NPU_TURBO': 'YES'},device_name='NPU')
except:
print(f"Failed loading NPU_TURBO for device {device}. Skipping... ")
else:
print_npu_turbo_art()
He must have found that this method didn't work in the same way on Linux -- hence the else:
elif "linux" in platform.system().lower():
if os.path.isfile('/sys/module/intel_vpu/parameters/test_mode'):
with open('/sys/module/intel_vpu/version', 'r') as f:
version = f.readline().split()[0]
if tuple(map(int, version.split('.'))) < tuple(map(int, '1.9.0'.split('.'))):
print(f"The driver intel_vpu-1.9.0 (or later) needs to be loaded for NPU Turbo (currently {version}). Skipping...")
else:
with open('/sys/module/intel_vpu/parameters/test_mode', 'r') as tm_file:
test_mode = int(tm_file.readline().split()[0])
if test_mode == 512:
print_npu_turbo_art()
else:
print("The driver >=intel_vpu-1.9.0 was must be loaded with "
"\"modprobe intel_vpu test_mode=512\" to enable NPU_TURBO "
f"(currently test_mode={test_mode}). Skipping...")
Any ideas about this.. i.e. is it still the case?
This logic only applies to internal kernel driver releases. Upstream version does not have turbo mode test mode. As name suggest this is only a test mode and should not be used in production. This is not the same functionality as on WIndows. I would strongly suggest to remove this elif completely.
Hello, when running the plugin on Ubuntu 24.04 (maybe other versions too, I haven't checked) on a system equipped with
Intel(R) Core(TM) Ultra 7 155H
I trigger an error at this line:The error arises due to the version string missing a micro or patch version:
Other system details in case they're useful: