Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hi~, good idea but not perfect #3

Open
szuboy opened this issue Mar 11, 2023 · 6 comments
Open

Hi~, good idea but not perfect #3

szuboy opened this issue Mar 11, 2023 · 6 comments

Comments

@szuboy
Copy link

szuboy commented Mar 11, 2023

I recently had to use setuptools for CUDA compilation, and found it to be a frustrating task.
Setuptools_cuda couldn't address all of my concerns, but I was able to use torch's cpp_extension to complete the task, albeit imperfectly, because it had to rely on the large framework of torch.

Therefore, I recommend that the development of setuptools_cuda should take inspiration from torch's approach, making it as smooth to use as the native setuptools.

from torch.utils.cpp_extension import BuildExtension, CUDAExtension, CppExtension

If you're in need of any assistance, please feel free to reach out to me as I have ample experience with Python CUDA compilation.

@szuboy szuboy changed the title Hi~, good idea but not prefect Hi~, good idea but not perfect Mar 11, 2023
@dexter2206
Copy link
Member

Hello. Thanks for your interest in setuptools_cuda. We're open to improvement suggestions but, unfortunately, I couldn't understand what you are missing in this package. Can you prepare a minimal example demonstrating what problems you faced?

@RafaelJVicente
Copy link

Hello, i think this library is perfect for projects working on modern CUDA projects that only need a default configuration, but that is not the case for me (i saw a post of stack overflow pretty similar to this library and one of the problems I had is that i cannot compile mixed .cu and .cpp files for example), what's more, if you have strange installations like the one I have in an old PC where you may need to add specific architecture parameters.
I use to have PyTorch installed but is a 800-900 MB project and the architecture I use in the old PC is already deprecated in Torch. I suppose that's what @szuboy refers to.

My library setuptools-cpp-cuda fix some of this problems and is partially based precisely in torch's cpp_extension adding support for older architectures and some more improvements and side fixes.

But just in case i think this library is perfect for fast developments and mine covers more complex or older architecture use cases.

@szuboy
Copy link
Author

szuboy commented Mar 12, 2023

@RafaelJVicente I completely agree with you and I am eager to give setuptools_cpp_cuda a try to see if it resolves my issue. Thank you for suggesting this approach, and I will definitely provide feedback on my experience.

Your idea is truly excellent!

@szuboy
Copy link
Author

szuboy commented Mar 12, 2023

Hello, i think this library is perfect for projects working on modern CUDA projects that only need a default configuration, but that is not the case for me (i saw a post of stack overflow pretty similar to this library and one of the problems I had is that i cannot compile mixed .cu and .cpp files for example), what's more, if you have strange installations like the one I have in an old PC where you may need to add specific architecture parameters. I use to have PyTorch installed but is a 800-900 MB project and the architecture I use in the old PC is already deprecated in Torch. I suppose that's what @szuboy refers to.

My library setuptools-cpp-cuda fix some of this problems and is partially based precisely in torch's cpp_extension adding support for older architectures and some more improvements and side fixes.

But just in case i think this library is perfect for fast developments and mine covers more complex or older architecture use cases.

sorry, it seems like setuptools-cpp-extension didn't solve my problem. Even though the setup.py can be compiled, I encountered some errors when trying to call it:

ImportError: /home/medai02/anaconda3/lib/python3.6/site-packages/xxxx-0+unknown-py3.6-linux-x86_64.egg/xxxx/_cmatrices.cpython-36m-x86_64-linux-gnu.so : undefined symbol: calculate_launcher

Do you have any suggestions on how to resolve this error? I appreciate your help.

@RafaelJVicente
Copy link

Hello, I have migrated the project to GitHub since I think it is more accessible and I've changed the name of the module from “setuptools-cpp-cuda” to setuptools-cuda-cpp becouse Pypi dont index the other one correctly.
@szuboy I think is more useful if you can open the issue here just in case other users have the same problem. If possible, can u also send me the "tree" of your project and your setup.py, I don’t use Conda but I had similar issues due to the setuptools version in python 3.6. With that info I think I can help you to fix the problem.
Ty in advance.

@dexter2206
Copy link
Member

@szuboy you still haven't shown exactly what the problem is when you try to use setuptools_cuda. Can you provide a minimal example demonstrating the problem so that we can assist you?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants