ScalingIntelligence / CATS

12 stars 2 forks source link

flash_gemv installation issue #1

Open sanjayss34 opened 3 months ago

sanjayss34 commented 3 months ago

After I run pip install -r requirements.txt; cd flash_gemv; pip install -e . I get the following error when I try to import flash_gemv. Do you know how I can fix this? For reference, this is using PyTorch 2.1.2 with CUDA 12.1

OSError                                   Traceback (most recent call last)

Cell In[1], line 1

----> 1 import flash_gemv

File ~/CATS/flash_gemv/flash_gemv/__init__.py:33

     30 spec = importlib.machinery.PathFinder().find_spec(

     31     library, [osp.dirname(__file__)])

     32 if spec is not None:

---> 33     torch.ops.load_library(spec.origin)

     34 else:

     35     raise ImportError(f"Could not find module '{library}' in "

     36                       f'{osp.dirname(__file__)}')

File ~/miniconda3/envs/code-tree-search/lib/python3.9/site-packages/torch/_ops.py:852, in _Ops.load_library(self, path)

    847 path = _utils_internal.resolve_library_path(path)

    848 with dl_open_guard():

    849     # Import the shared library into the process, thus running its

    850     # static (global) initialization code in order to register custom

    851     # operators with the JIT.

--> 852     ctypes.CDLL(path)

    853 self.loaded_libraries.add(path)

File ~/miniconda3/envs/code-tree-search/lib/python3.9/ctypes/__init__.py:382, in CDLL.__init__(self, name, mode, handle, use_errno, use_last_error, winmode)

    379 self._FuncPtr = _FuncPtr

    381 if handle is None:

--> 382     self._handle = _dlopen(self._name, mode)

    383 else:

    384     self._handle = handle

OSError: /home/sanjayss/CATS/flash_gemv/flash_gemv/_C.so: undefined symbol: _ZN2at4_ops19empty_memory_format4callEN3c108ArrayRefINS2_6SymIntEEESt8optionalINS2_10ScalarTypeEES6_INS2_6LayoutEES6_INS2_6DeviceEES6_IbES6_INS2_12MemoryFormatEE
vxbrandon commented 3 months ago

Hi Sanjay,

Could you let me know which python version you are using now?

vxbrandon commented 3 months ago

@sanjayss34

sanjayss34 commented 3 months ago

Python 3.9.18

sanjayss34 commented 3 months ago

@vxbrandon