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

Success compiling and running cuda_example.cu on Apple M1 Big sur #95

Open
dokipen3d opened this issue Feb 17, 2021 · 1 comment
Open

Comments

@dokipen3d
Copy link
Contributor

This isn't really an 'issue' but I did have to go through some hoops to get this to work....

  1. Use llvm@7 from homebrew
  2. comment out line 35-83 in /llvm@7/7.1.0_2/lib/clang/7.1.0/include/cuda_wrappers/new to remove all of the ::operator free/new/deletes which cause errors when compiling cuda code
  3. This is at the moment compiling under rosetta. I'm about to try aarch64 and will report back here.

I tried llvm 11 from the latest homebrew package but the hostraw.ll file contained unnamed function parameters (%0, %1) which it didn't seem to like.

hostraw.ll:9:46: error: expected ')' at end of argument list
define void @_Z18__device_stub__addPiS_(i32* %0, i32* %1) #0 {

the llvm 4 package from the install distro was tricky in that it didn't accept the version of macos (too early a version of clang?). I can't find where that argument is coming from/being generated.
error: invalid version number in '-mmacosx-version-min=11.1

Oh well, still a cool little project. I'll see if I can get anything more complicated running.

@dokipen3d
Copy link
Contributor Author

Some other tests are having trouble again at the llvm ir stage...

/bin/patch_hostside: phiaddressspace-hostraw.ll:38:14: error: expected type
  %23 = fmul contract float %22, 3.500000e+00
             ^

@dokipen3d dokipen3d changed the title Success compiling and running cuda_example.cu on Apple M1 Big sure Success compiling and running cuda_example.cu on Apple M1 Big sur Feb 17, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant