-
Notifications
You must be signed in to change notification settings - Fork 100
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
Create Pip Package #21
Conversation
CMakeLists.txt
Outdated
@@ -245,3 +245,28 @@ if (BUILD_SHARED_LIBS) | |||
set_target_properties(rwkv PROPERTIES POSITION_INDEPENDENT_CODE ON) | |||
target_compile_definitions(rwkv PRIVATE RWKV_SHARED RWKV_BUILD) | |||
endif() | |||
|
|||
if(SKBUILD) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if(SKBUILD) | |
if (SKBUILD) |
setup.py
Outdated
from skbuild import setup | ||
|
||
setup( | ||
name="rwkv_cpp_python", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess just rwkv_cpp
or more preferred rwkv-cpp
is fine, since this is already a Python package :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds good, I'll update this as well. I believe both alias to the same name on PyPI.
Huge thanks! Sorry if it is inappropriate to leave comments on draft PR. Let me know when this is ready for me to check whether it builds! BTW, do I need to register somewhere/do something extra to publish the package to |
Not at all, thank you so much for all your work on this project, hopefully this will let more people (like me) experiment with RWKV in their projects. And yes, I'll let you know once it's ready to test, the build currently works correctly but I'm having some pure python importing issues.
Yes, just head over to https://pypi.org/account/register/ and once you've registered let me know the username. |
@abetlen Registered on PyPi: https://pypi.org/user/saharNooby/ |
Awesome, invite sent. |
Latest changes:
|
Is this branch stable? I'm going to back-port my changes onto this. |
@iacore yes these are all my changes so far, really appreciate that! Sorry I meant to put more work in here but I got a little busy in the last week. |
Hey @saharNooby here is some preliminary work to set up a python package similar to the one I've set up in llama-cpp-python using scikit-build to handle building the shared library. This is still a work-in-progress so I'm totally open to change anything / answer any questions / etc. Let me know what you think
Changes