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

Build error when cross compiling quantization for arm #22

Open
chiru-arh opened this issue Jan 17, 2024 · 5 comments
Open

Build error when cross compiling quantization for arm #22

chiru-arh opened this issue Jan 17, 2024 · 5 comments
Assignees

Comments

@chiru-arh
Copy link

chiru-arh commented Jan 17, 2024

I'm getting below error when cross-compiling quantization for arm64.

warning: [email protected]: tools/arm-linux-gnueabi-gcc-9.2/bin/arm-linux-gnueabi-ar: 
'app/target/arm-unknown-linux-gnueabi/debug/build/quantization-84a087b7ec779edc/out/libsimd_utils.a': No such file
error: failed to run custom build command for quantization v0.1.0 (https://github.com/qdrant/quantization.git#9395db62

How can I fix this

@timvisee
Copy link
Member

Is it possible that you've configured cross-compilation incorrectly? We're doing cross compilation in Qdrant as well targeting ARM64 without issues.

A bunch of architecture specific code is gated by specific platform attributes. It looks like something is going wrong here.

Could you share the command you use for cross compilation?

@chiru-arh chiru-arh changed the title Build error when cross compiling quantization for arm64 Build error when cross compiling quantization for arm Jan 17, 2024
@chiru-arh
Copy link
Author

chiru-arh commented Jan 17, 2024

Is it possible that you've configured cross-compilation incorrectly? We're doing cross compilation in Qdrant as well targeting ARM64 without issues.

A bunch of architecture specific code is gated by specific platform attributes. It looks like something is going wrong here.

Could you share the command you use for cross compilation?

@timvisee , thank you for the reply. did you try building qdrant for ARM(not ARM 64) specifically? I didn't see any condition here for arm

if target_arch == "x86_64" {
builder.file("cpp/sse.c");
builder.file("cpp/avx2.c");
if builder.get_compiler().is_like_msvc() {
builder.flag("/arch:AVX");
builder.flag("/arch:AVX2");
builder.flag("/arch:SSE");
builder.flag("/arch:SSE2");
} else {
builder.flag("-march=haswell");
}
// O3 optimization level
builder.flag("-O3");
// Use popcnt instruction
builder.flag("-mpopcnt");
} else if target_arch == "aarch64" && target_feature.split(',').any(|feat| feat == "neon") {
builder.file("cpp/neon.c");
builder.flag("-O3");
}

@jay11ca39
Copy link

@timvisee
I am able to do cross compilation for aarch64 but for arm it is failing with same as mentioned on this issue.
Can you please help on this?

@jay11ca39
Copy link

Hello @IvanPleshkov ,
Any suggestion for this issue.
Is ARM build is possible for quantization ?

@IvanPleshkov IvanPleshkov self-assigned this May 28, 2024
@IvanPleshkov
Copy link
Collaborator

Thanks for the issue! I gonna remove all C code from repo and this issue will be fixed (draft PR #26)

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

4 participants