cortex.cpp icon indicating copy to clipboard operation
cortex.cpp copied to clipboard

engine: AMD GPU support

Open hiento09 opened this issue 2 years ago • 16 comments

Overview

Tasklist

Original Post

Problem We need a new nitro bin file that support AMD GPU for both windows and linux

Success Criteria

  • new nitro bin file support AMD GPU
  • Integrate to Jan app

hiento09 avatar Jan 08 '24 02:01 hiento09

hi @hiento09 can we spin up the azure instance of AMD GPU and test

tikikun avatar Jan 09 '24 01:01 tikikun

hi @hiento09 can you set up an instance with the specs like the link below, azure is not working

https://gist.github.com/cgmb/6ae0d118bf357fc4576a7568b85e1c45

tikikun avatar Jan 09 '24 08:01 tikikun

Tutorial to compile nitro on that system above (details in link https://gist.github.com/cgmb/6ae0d118bf357fc4576a7568b85e1c45 ):

First step, install AMD things (for details link: https://gist.github.com/cgmb/6ae0d118bf357fc4576a7568b85e1c45) : image

After that just build nitro with below flag:

CC=/opt/rocm/llvm/bin/clang CXX=/opt/rocm/llvm/bin/clang++ \
    cmake -H. -Bbuild -DLLAMA_HIPBLAS=ON -DAMDGPU_TARGETS= gfx1011 -DCMAKE_BUILD_TYPE=Release 

and

make

tikikun avatar Jan 09 '24 09:01 tikikun

I am requesting quota for g4ad ec2 instance on aws, will comeback to this task when they open quota for us

hiento09 avatar Jan 15 '24 12:01 hiento09

I was able to build nitro with above flag successfully using this docker image https://hub.docker.com/r/rocm/dev-ubuntu-22.04 but did not have AMD GPU for testing the bin file image

hiento09 avatar Jan 15 '24 19:01 hiento09

image AWS reject our quota request, we may need to consider purchasing for some AMD GPU, @tikikun , @dan-jan

hiento09 avatar Jan 15 '24 19:01 hiento09

I have one, let me test tomorrow 🗡️ @hiento09

Do you have file so I can test? Or what do I need to do to built it if need?

hiepxanh avatar Jan 16 '24 14:01 hiepxanh

@hiento09 can you provide bin file? I cannot make the build run on my WSL 2 windows

my target CPU is: gfx1032 (radeon 6600xt) if you need

image

hiepxanh avatar Jan 17 '24 02:01 hiepxanh

rename to ROCm support since vulkan already supported

tikikun avatar Jan 30 '24 02:01 tikikun

still have ROCm build left @hiento09 @hiro-v

tikikun avatar Feb 06 '24 05:02 tikikun

Experimental feature: 0.4.7 - Vulkan

louis-jan avatar Feb 22 '24 03:02 louis-jan

@louis-jan No it's not This is AMD RoCm (equivalent to NVIDIA CUDA), not Vulkan. I'm moving this one back to Icebox as of now

hiro-v avatar Feb 26 '24 09:02 hiro-v

converting this to epic to close https://github.com/janhq/jan/issues/913

Van-QA avatar Feb 27 '24 03:02 Van-QA

@Van-QA can we queue this up after trtllm for Cam? 🙏

freelerobot avatar Jun 11 '24 01:06 freelerobot

hi @0xSage, if you look at the sprint / status, you can see that it's already in the n‌ext spr‌int

Van-QA avatar Jun 11 '24 02:06 Van-QA