How to know which target is selected for a AOT multitarget static library? #4924
Replies: 1 comment
-
There isn't currently an official way to tell which target it selected. But you could hack around it in several ways; most notably, something like:
If you needed more sophisticated runtime sniffing, you could insert a
Yes and no: You can replace the implementation of If you need a more robust way to choose different implementations at runtime, I'd strongly recommend just writing your own wrapper code to do so and not trying to use the multitarget facility at all; the multitarget stuff is really targeted at things like the x86 architecture where there is a clear and obvious best choice based on CPUID. |
Beta Was this translation helpful? Give feedback.
-
How do I know which target it selected, without changing all targets to
*-debug
?Also, is there a way to influence the selection at runtime? For example to balance load between CPU and GPU implementations?
I'm planning on generating and gathering performance reports from users, and knowing which version of the pipeline they run would be very interesting. It'd be great if I could simply know, without having to rewrite the dispatch layer myself.
Beta Was this translation helpful? Give feedback.
All reactions