composable_kernel icon indicating copy to clipboard operation
composable_kernel copied to clipboard

[Issue]: ROCm/xformer won't compile due to missing ck/tensor/tensor_view.hpp

Open lhl opened this issue 1 year ago • 1 comments

Problem Description

I have a 7900XTX (RDNA3, navi3, gfx1100) card that I'm trying to do some useful LLM work and one of the requirements I have is xformers. I am trying to build the https://github.com/ROCm/xformers/tree/develop fork. It depends on composable_kernel, but when building, it fails because it's looking for a file that doesn't seem to exist (and search doesn't seem to turn anything up either):

xformers/xformers/csrc/attention/hip_fmha/ck_tiled_fmha_batched_forward_hip.h:16:10: fatal error: 'ck/tensor/tensor_view.hpp' file not found #include <ck/tensor/tensor_view.hpp>

Just wondering if there's a branch I missed that I should be using instead or some other way to get xformers compiling w/ ck?

Operating System

Ubuntu 22.04.3 LTS

CPU

AMD Ryzen 5800X3D

GPU

AMD Radeon RX 7900 XTX

Other

No response

ROCm Version

ROCm 6.0.0

ROCm Component

No response

Steps to Reproduce

git clone https://github.com/ROCm/xformers
cd xformers
git fetch
git branch -a
git checkout develop
git submodule update --init --recursive
python setup.py install

(Optional for Linux users) Output of /opt/rocm/bin/rocminfo --support

No response

Additional Information

No response

lhl avatar Feb 18 '24 09:02 lhl

Dear developers. I support the question. Tell me, is it possible to use xformers with composable_kernel (or without composable_kernel) with a 7900 xtx video card?

hackey avatar Aug 01 '24 06:08 hackey

@lhl Apologies for the delayed response. Internal ticket has been created to assist with your issue. Thanks!

ppanchad-amd avatar Aug 21 '24 19:08 ppanchad-amd

@lhl @hackey,

Currently, xformers on ROCm only works with MI200/MI300. So unfortunately, 7900 XTX won't be able to run it at the moment. Apologize for the inconvenience.

alexxu-amd avatar Aug 22 '24 18:08 alexxu-amd

@lhl @hackey Currently, xformers on ROCm only works with MI200/MI300. So unfortunately, 7900 XTX won't be able to run it at the moment. Apologize for the inconvenience.

OK, thanks for the followup. I know at some point @danielhanchen was chatting w/ some people at AMD a few months back as well, but lack of xformers is I believe the big blocker for unsloth support.

If it matters to anyone up the chain, feedback that RDNA3 would be significantly more useful if xformers were supported. (I know AMD has been trying to push the W7900 as an AI/ML dev/workstation card, but RDNA3 support is poor across the board, not just xformers!)

lhl avatar Aug 22 '24 19:08 lhl

i dont know if this works, but it installed: https://github.com/EmbeddedLLM/xformers-rocm pip install git+https://github.com/EmbeddedLLM/xformers-rocm.git

you can also install xformers directly from the pytorch website

unclemusclez avatar Aug 23 '24 11:08 unclemusclez