Open sm-ak-r33 opened 4 months ago
The primary issue causing the user's setup problems is the empty CMakeLists.txt
file in the python/xlstm
directory. This file is crucial for configuring the build process using CMake. Additionally, the README.md file lacks detailed instructions for setting up the project, which leads to confusion during the setup process.
To resolve these issues, we need to:
CMakeLists.txt
file with the necessary configuration.README.md
file to provide clear and detailed setup instructions.The bug is caused by an empty CMakeLists.txt
file, which results in CMake errors related to missing configurations and compilers. Additionally, the README.md file does not provide sufficient instructions for navigating directories and running CMake commands, leading to user confusion and setup failures.
Here is a basic template for the CMakeLists.txt
file to get started:
cmake_minimum_required(VERSION 3.10)
# Set the project name
project(xLSTM)
# Specify the C++ standard
set(CMAKE_CXX_STANDARD 11)
set(CMAKE_CXX_STANDARD_REQUIRED True)
# Add source files
set(SOURCE_FILES
src/main.cpp
src/other_source_file.cpp
# Add other source files here
)
# Include directories
include_directories(include)
# Add the executable
add_executable(xLSTM ${SOURCE_FILES})
# Find required packages
find_package(CUDA REQUIRED)
# Link libraries
target_link_libraries(xLSTM ${CUDA_LIBRARIES})
Here is an updated version of the relevant sections of the README.md
file with more detailed setup instructions:
## Installation
1. Clone the repository:
```shell
git clone https://github.com/smvorwerk/xlstm-cuda.git
cd xlstm-cuda
Navigate to the python/xlstm
directory:
cd python/xlstm
Create a build directory and navigate into it:
mkdir build
cd build
Run CMake to configure the project:
cmake ..
Note: If you encounter errors related to missing compilers, ensure that you have a C++14 compiler and the CUDA toolkit installed. You can specify the compilers explicitly by setting the CMAKE_C_COMPILER
and CMAKE_CXX_COMPILER
variables:
cmake -DCMAKE_C_COMPILER=gcc -DCMAKE_CXX_COMPILER=g++ ..
Build the project:
make
Install the Python package:
cd ../../..
cd python
python setup.py install
gcc --version
or g++ --version
.nvcc
compiler is available in your PATH. You can check this with nvcc --version
.
Clone the repository:
git clone https://github.com/smvorwerk/xlstm-cuda.git
cd xlstm-cuda
Navigate to the python/xlstm
directory:
cd python/xlstm
Create a build directory and navigate into it:
mkdir build
cd build
Run CMake to configure the project:
cmake ..
You will encounter errors related to missing configurations and compilers because the CMakeLists.txt
file is empty.
The empty CMakeLists.txt
file is the root cause of the build issues described in the user's ticket. By populating this file with the appropriate configuration and updating the README.md
file with detailed setup instructions, the build process can be correctly set up, resolving the errors related to missing compilers and configurations.
Click here to create a Pull Request with the proposed solution
Files used for this task:
+1
I've used nvidia/cuda:12.2.2-devel-ubuntu22.04
docker image.
It didn't build.
Then I've compiled from source C++14 and that made the installation fail as nvcc works with C++12 and below
I have little experience with cmake and all this c stuff but your README is definitely not enough.
Please include a Dockerfile at least or push a docker image at best
It creates xlstm cuda and then cd xLSTM does not work.
When I try to redirect it using PS C:\Users\b-skarim\Desktop\repos_xlstm\xlstm-cuda> cd python\xlstm PS C:\Users\b-skarim\Desktop\repos_xlstm\xlstm-cuda\python\xlstm> mkdir build it does work but then it misses out the cmake file,
when I redirect it to the cmakelist file again, then I have the following issue
CMake Warning: Ignoring extra path from command line:
".."
CMake Error: The source directory "C:/Users/b-skarim/Desktop/repos_xlstm/xlstm-cuda/python/xlstm" does not appear to contain CMakeLists.txt. Specify --help for usage, or press the help button on the CMake GUI. PS C:\Users\b-skarim\Desktop\repos_xlstm\xlstm-cuda\python\xlstm\build> cmake .. -- Building for: NMake Makefiles CMake Error at CMakeLists.txt:2 (project): Running
'nmake' '-?'
failed with:
no such file or directory
CMake Error: CMAKE_C_COMPILER not set, after EnableLanguage CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage -- Configuring incomplete, errors occurred!