Last active
February 16, 2026 09:18
-
-
Save andersx/a202f5c735b838204e850dbfcfe08af1 to your computer and use it in GitHub Desktop.
libfakeintel.c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // #include <stdio.h> | |
| // uncomment include statement and printf calls | |
| // to enable debug output | |
| // LD_PRELOAD hacck to use MKL on AMD CPUs | |
| // | |
| // compiling: | |
| // icx -shared -fPIC -o libfakeintel.so libfakeintel.c | |
| // | |
| // useage: | |
| // export LD_PRELOAD=libfakeintel.so | |
| int mkl_serv_intel_cpu_true() { | |
| // printf("fakeintel: mkl_serv_intel_cpu_true called\n"); | |
| return 1; | |
| } | |
| typedef int (*fakeintel_fptr)(void); | |
| fakeintel_fptr mkl_serv_get_cpu_true() { | |
| // printf("fakeintel: mkl_serv_get_cpu_true called\n"); | |
| return &mkl_serv_intel_cpu_true; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment