Skip to content
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

Mac M1 not automatically detected #495

Closed
BUMPRW opened this issue May 4, 2021 · 5 comments · Fixed by #533
Closed

Mac M1 not automatically detected #495

BUMPRW opened this issue May 4, 2021 · 5 comments · Fixed by #533

Comments

@BUMPRW
Copy link

BUMPRW commented May 4, 2021

Have tried a variety of methods to install. The error message remains the same.

*** Cannot continue with unregistered configuration

@devinamatthews
Copy link
Member

BLIS currently doesn't work on M1 (see #492). Now, it looks like you're seeing a slightly different issue. Could you please send the command you used to configure and the full output?

@BUMPRW
Copy link
Author

BUMPRW commented May 4, 2021

This is an attempt to have brew install blis, the result is almost identical for a python install and ./configure auto:
brew install --build-from-source blis
==> Downloading https://github.com/flame/blis/archive/0.8.1.tar.gz
Already downloaded: /Users/xxxxxxxxxxxxx/Library/Caches/Homebrew/downloads/b730fb496c498b4333b5e032fe947fd181ecdd62cfc129c1c8ab23dc9127a384--blis-0.8.1.tar.gz
==> ./configure --prefix=/opt/homebrew/Cellar/blis/0.8.1 --enable-cblas auto
Last 15 lines from /Users/xxxxxxxxxxx/Library/Logs/Homebrew/blis/01.configure:
configure: reading configuration registry...done.
configure: determining default version string.
configure: could not find '.git' directory; using unmodified version file.
configure: starting configuration of BLIS 0.8.1.
configure: configuring with official version string.
configure: found shared library .so version '3.0.0'.
configure: .so major version: 3
configure: .so minor.build version: 0.0
configure: automatic configuration requested.
configure: hardware detection driver returned ''.
configure: checking configuration against contents of 'config_registry'.
configure: 'auto-detected configuration '' is NOT registered!
configure:
configure: *** Cannot continue with unregistered configuration ''. ***
configure:

Do not report this issue to Homebrew/brew or Homebrew/core!

@devinamatthews
Copy link
Member

Ah, we definitely haven't implemented auto-detection for M1. I've changed the title to reflect this specific problem so we can remember to fix it once BLIS actually compiles on that platform.

@devinamatthews devinamatthews changed the title Will not install on MAC M1 Mac M1 not automatically detected May 4, 2021
@jeffhammond
Copy link
Member

not hard to write, but if you want the dumb C code to detect Apple M1, here it is:

#include <stdio.h>
#include <stdlib.h>
#include <string.h>

#include <sys/types.h>
#include <sys/sysctl.h>

int main(void)
{
    int rc;
    size_t len;
    rc = sysctlbyname("machdep.cpu.brand_string", NULL, &len, NULL, 0);
    char * buf = calloc(len,1);
    rc = sysctlbyname("machdep.cpu.brand_string", buf, &len, NULL, 0);
    printf("machdep.cpu.brand_string = %s\n",buf);
    printf("is Apple M1? %s\n", 0==strncmp(buf,"Apple M1",len) ? "yes" : "no");
    free(buf);
    return 0;
}

@hominhquan
Copy link
Contributor

I wonder if the CPU detection can not be done with some standard API like PAPI or hwloc ? This adds a dependency certainly, but provides easier management.

http://icl.cs.utk.edu/projects/papi-2.1/files/html_man/papi_get_hardware_info.html

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants