-
Notifications
You must be signed in to change notification settings - Fork 141
[WIP] Add SIMD support #686
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
a196a11
to
83ef4bb
Compare
Signed-off-by: Ludvig Liljenberg <[email protected]>
return Err(new_error!("AVX support not detected on the host machine")); | ||
} | ||
// avx2 is EAX=7, EBX bit 5 | ||
if !entries |
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.
Why do we error on all of these, rather than mirroring the host cpuid & being careful to only configure the features that actually exist on this platform?
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.
What if a guest is compiled with for example +avx
, but the host doesn't support it? We won't be able to run it so I thought it'd be better to error early than get InvalidOp exception in guest.
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 feel like that might just need to be a "you have to be careful about this when using simd if not using feature detection" thing? (a lot of software nowdays has feature detection for advanced simd anyway). I feel it probably doesn't make sense to statically decide in Hyperlight what simd features will be supported; this both rules out using hyperlight on older hardware & prevents using newer simd features on newer hardware.
KVM done, TODO windows & mshv