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

project does not work as submodule #88

Closed
bachittle opened this issue Mar 11, 2024 · 2 comments
Closed

project does not work as submodule #88

bachittle opened this issue Mar 11, 2024 · 2 comments
Labels
type:bug Something isn't working

Comments

@bachittle
Copy link

steps to reproduce issue:

take a look at my minimal example: https://github.com/bachittle/test-gemma-submodule . I add gemma.cpp as a subdirectory and compile it. The main executable is now in the build folder alongside libgemma. But when I try to run it, it does not go past the "reading prompt" stage. This is unusual, as even that executable should behave the same as if compiled directly. So I am unsure of what the issue is. This also shows up in my own repository when initializing and calling the GenerateGemma function, so that may be where the issue arises.

@bachittle
Copy link
Author

I figured out the issue. The project must compile in Release mode, it does not work in Debug. Is this something that can or should be fixed or documented? Sometimes it is useful to compile things in Debug mode. I will close issue.

@jan-wassenberg
Copy link
Member

Glad you've found the issue. With SIMD code, unfortunately debug builds are about 100x slower and thus not usable. The minimum optimization flags required are for inlining. Personally, I get more value from asan and msan builds; we also enable our debug-only asserts there.

copybara-service bot pushed a commit that referenced this issue Mar 12, 2024
PiperOrigin-RevId: 614873909
copybara-service bot pushed a commit that referenced this issue Mar 12, 2024
PiperOrigin-RevId: 614873909
copybara-service bot pushed a commit that referenced this issue Mar 12, 2024
PiperOrigin-RevId: 614873909
copybara-service bot pushed a commit that referenced this issue Mar 12, 2024
PiperOrigin-RevId: 614873909
copybara-service bot pushed a commit that referenced this issue Mar 12, 2024
PiperOrigin-RevId: 614906000
@tilakrayal tilakrayal added the type:bug Something isn't working label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants