Skip to content

Instantly share code, notes, and snippets.

@andersx
Last active February 16, 2026 09:18
Show Gist options
  • Select an option

  • Save andersx/a202f5c735b838204e850dbfcfe08af1 to your computer and use it in GitHub Desktop.

Select an option

Save andersx/a202f5c735b838204e850dbfcfe08af1 to your computer and use it in GitHub Desktop.
libfakeintel.c
// #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