-
Notifications
You must be signed in to change notification settings - Fork 77
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
[Bug] ACL Core Library no longer apart of Arm Compute Library -> Failure to Compile TVM's ACL Contrib. Lib. #321
Comments
Buehler? Turns out this issue is deeper than I thought. Though, at the same time, it is relatively straight-forward. Seems entirely tied up on integrating ACL Lib/Graph. This is traditionally an Intel-centric library, as the dominant ARM producer prior to Apple's M-series. ACL does compile, it isn't pretty though. But anyways, I guess without a more experienced user's intervention, the data traded betw. ACL and one's computer does not transfer over to TVM. I'd imagine if I exported a profile from the ACL Lib. for LLVM, then my compilation wouldn't get tripped up. RIght now getting multiple errors regarding the target of the compilation. Codegen_cpu, codegen_amdgpu, codegen_aarch64 are some I see. But I suppose the code will speak better than I can.
Prior to this, maybe the origin, is aprofile.cc, which is for profiling arm-cortex CPUs (due to the ACL use). But like I said, I'm noob-ish, so with a better CMake setup from ACL into TVM (and then MLC), I imagine one can thread the needle without making concessions (I will probably just give up on ACL, TVM/MLC has compiled with little to no problems in the past. Though I learned a lot, can't help myself, may give 'er 1 last go, clean install from step 000 and now a toolchain file heh |
So I did try again, this time I nixed ACL and still ended up with these foundational errors. I can't imagine what I'd be doing each time that CMake would not like (user error).
1 thing I'm noticing, and would make sense as the crux to my issues, is I can't seem to get TVM to build with TVM_THREADPOOL_USE_OPENMP(sic) which'd seem pretty critical to TVM's ability to manage Metal/MPS' threading if I follow what that is doing correctly. Usually these errors are preceded by some "threading"
|
Yeah, seems that the source is when a module like ACL, MKL or AppleBLAS in general relies on that MPS gemm.mm file issues arise. Trying to think of anything else I could try, I used sudo and same results. I am able to compile without those add-ons. Edit: Although, it seems I shouldn't have been able to compile whatsoever. I did so without some of the flags I'd normally tack on. While I doubt that'd make a huge difference, perhaps with the cache of errors, the latter builds were "ready" for that issue to come up and just let that error through initially. Also, not sure if I had included this warning, but it always seems to head-off the error train.
|
What Happened
When I attempt to build TVM-Unity I run into errors with the ACL Lib. I believe/hope it is because of this change not being reflected within the TVM ACL CMake Config.
The 2 errors that trip up the build are...
All the files are in /src/runtime/contrib/arm_compute_lib/ of course.
Edit: This actually affects more than just the ACL Contrib. comp. but also the Rust build --
Environment
Mac 14.4, Silicon/Metal/MPS/aarm64, whatever you want to call it.
Because Relax doesn't have a TVM-Unity ver., don't have that readily accessible, but, latest 😅
CMake 3.29.2, LLVM 18.1.6: CLANG, -std=c++17
Steps to reproduce
//Path to a library.
EXTERN_ACL_COMPUTE_CORE_LIB:FILEPATH=OFF
//Path to a library.
EXTERN_ACL_COMPUTE_GRAPH_LIB:FILEPATH=/Users/zack/.home/gitrepos/LLMLife/backend/Misc/ComputeLibrary-24.04/arm_compute/build/libarm_compute_graph.dylib
//Path to a library.
EXTERN_ACL_COMPUTE_LIB:FILEPATH=/Users/zack/.home/gitrepos/LLMLife/backend/Misc/ComputeLibrary-24.04/arm_compute/build/libarm_compute.dylib
There is still a core lib., it just isn't associated with a .dylib so one cannot provide the core lib dir as the filepath.
Notes
Besides the aforementioned issue, the other elephant in the room is that I am doing this on a Mac which leads to a shaky from-source Arm Compute Library build that doesn't have a full suite of functionalities. A few folks have been requesting them to provide prebuilt Mac packages (I mention because I'm sure that'd at least ensure an error-free compilation, no loose ends).
I doubt these errors are related and I imagine this is something that routinely causes issues in packages but just to be thorough (and maybe get help 😂):
Going to look into this one online as mentioned, so I imagine I'll be able to clear it up.
Solution
Obviously I don't readily have one. I figure my best option is to use CMake functions to link my IAllocator.h, Types.h to the complimenting TVM contrib. files.
I tried this but I'm probably doing something wrong...doesn't help that 1 or 2 of the problematic headers is used in multiple files AFAIK/AFAIR.
The text was updated successfully, but these errors were encountered: