LocalAI icon indicating copy to clipboard operation
LocalAI copied to clipboard

fix(hipblas): disable avx flags when accellerated bins are used

Open mudler opened this issue 1 year ago • 2 comments

Description

Seems the hipblas binary still have AVX and other CPU flags that might be problematic on old HW. As hipblas is reserved in cases of running inference on GPU, CPU optimizations aren't needed and actually just causes sigsev when running binaries.

Notes for Reviewers

See: https://github.com/mudler/LocalAI/issues/3367#issuecomment-2480400573

Signed commits

  • [ ] Yes, I signed my commits.

mudler avatar Nov 16 '24 13:11 mudler

Deploy Preview for localai ready!

Name Link
Latest commit 8ddd01c818525e14a5ff433b2f7afcddb9d6a7cc
Latest deploy log https://app.netlify.com/sites/localai/deploys/6738a483b31ac600081e586c
Deploy Preview https://deploy-preview-4167--localai.netlify.app
Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

netlify[bot] avatar Nov 16 '24 13:11 netlify[bot]

Thanks so much for this @mudler - looking forward to confirming the fix as soon as possible.

chris-hatton avatar Nov 17 '24 01:11 chris-hatton

@mudler I've tried again with image localai/localai:master-hipblas, which I think should now contain the fix, following merge of #3367

...unfortunately it's the same result. Using docker image inspect localai/localai:master-hipblas to confirm the image ID:

[
    {
        "Id": "sha256:7c9ffb9f8d249df6d068308adc9e8c1e5b183845031d6ff976b811ffe9106dee",
        "RepoTags": [
            "localai/localai:master-hipblas"
        ],
        "RepoDigests": [
            "localai/localai@sha256:a5dac979e4cac52729619c98daec793537d16c9ecc430d07c1a04cd6628973b7"
        ],
        "Parent": "",
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2024-11-17T14:46:58.000365484Z",
        ...

...exit code 132 (Invalid OpCode).

chris-hatton avatar Nov 18 '24 08:11 chris-hatton

@mudler I've tried again with image localai/localai:master-hipblas, which I think should now contain the fix, following merge of #3367

...unfortunately it's the same result. Using docker image inspect localai/localai:master-hipblas to confirm the image ID:

[
    {
        "Id": "sha256:7c9ffb9f8d249df6d068308adc9e8c1e5b183845031d6ff976b811ffe9106dee",
        "RepoTags": [
            "localai/localai:master-hipblas"
        ],
        "RepoDigests": [
            "localai/localai@sha256:a5dac979e4cac52729619c98daec793537d16c9ecc430d07c1a04cd6628973b7"
        ],
        "Parent": "",
        "Comment": "buildkit.dockerfile.v0",
        "Created": "2024-11-17T14:46:58.000365484Z",
        ...

...exit code 132 (Invalid OpCode).

I think it didn't contained the fix yet, but it should now - due to https://github.com/mudler/LocalAI/pull/4201. CI was failing before publishing all the images.

To double check you can compare the versions when running LocalAI: if you hit the /version endpoint or the webUI (at the bottom bar) it will show the commit version.

mudler avatar Nov 20 '24 09:11 mudler