Thanks to visit codestin.com
Credit goes to github.com

Skip to content

rwkv_clone_context thread-safety when using cuBLAS #182

@eduardsui

Description

@eduardsui

Hello,

I'm trying to use rwkv.cpp in two different threads. For this, I'm loading the model and then using two context clones (via rwkv_clone_context). Everything works fine when each thread runs rwkv_eval, but when running simultaneously in two threads, I get an error:

GGML_ASSERT: /root/rwkv.cpp/ggml/src/ggml-cuda.cu:409: ptr == (void *) (pool_addr + pool_used)
GGML_ASSERT: /root/rwkv.cpp/ggml/src/ggml-cuda.cu:409: ptr == (void *) (pool_addr + pool_used)

It seems that alloc/free are called "out of order" for the two contexts. Any idea how to solve this?

Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions