- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello,
Accordingly to this post "When running in a virtual machine, you may never be sure which physical CPU you are running on - a hypervisor can pass anything as CPUID to its guests".
I have a code compiled with icl.exe with options /arch:AVX /QaxCORE-AVX512,CORE-AVX2. Some parts contain loops (compilation log shows that they are vectorized). Other parts of my code call MKL functions (with static link). From my point of view: my program is able to run on several architectures (with AVX compatibility at least) and the best instructions to use will be detected at runtime.
In case of running in VM with an hypervisor, I wonder what happens if:
- The physical CPU is AVX-512 compatible (Cascade Lake) but the hypervisor says that it is only AVX2 compatible.
- The physical CPU is only AVX2 compatible (Haswell) but the hypervisor claims that it is AVX-512.
In both cases: which instruction level will be used (AVX2, AVX-512, ...) at runtime? Will my loops compiled with icl.exe and the MKL functions use the same instructions? Will it crashed?
I precise that do not know how an hypervisor works.
I also wonder if there is any case where the "detection of the best instructions to use at runtime" could failed and what will be the behavior in this case (defaulting, crash,...)?
Config:
- Virtual Machine in Azure cloud: Windows server 2016.
- Intel Composer 2020.1.216
Thank in advance for your help,
Guillaume A.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From the post, sounds like they “downgrade” CPUs, not “upgrade”. Meaning less capabilities.
It would only be a problem if hypervisor adds features that are not part of the cpu (your second case). And I would consider that a bug in the hypervisor.
The 1st case: AVX2 code path would be selected to execute. The 2nd case would get "illegal instructions" if AVX512 was chosen to be executed
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Thanks for raising your issue. We are working on this internally and will get back to you.
Regards,
Rahul
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
From the post, sounds like they “downgrade” CPUs, not “upgrade”. Meaning less capabilities.
It would only be a problem if hypervisor adds features that are not part of the cpu (your second case). And I would consider that a bug in the hypervisor.
The 1st case: AVX2 code path would be selected to execute. The 2nd case would get "illegal instructions" if AVX512 was chosen to be executed

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page