-
Notifications
You must be signed in to change notification settings - Fork 12.2k
fix memcpy() crash, add missed cmd in guide, fix softmax #6622
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
fix memcpy() crash, add missed cmd in guide, fix softmax #6622
Conversation
@slaren I have tried a solution to return support_mmap by backend in callback function. |
This is not ok, if you need a workaround add a |
@slaren |
If the driver crashes when it receives an address from |
driver is not crash. |
memcpy the ptr you get in the |
host -> host -> device. this solution should be OK. |
@slaren Yes, it works well. |
ggml-sycl.cpp
Outdated
@@ -16802,22 +16809,50 @@ catch (sycl::exception const &exc) { | |||
std::exit(1); | |||
} | |||
|
|||
class host_buffer { |
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.
approved after this is removed
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.
yes, remove host_buffer. use malloc/free for thread safe and better performance.
* disable mmap to fix memcpy crash, add missed cmd in guide, fix softmax * refactor to disable mmap for SYCL backend * fix compile error in other os * refactor the solution, use host buf to fix it, instead of disable mmap * keep to support mmap() * use host buff to reduce malloc times * revert to malloc/free solution, for threaad safe
…l-org#6622)" This reverts commit de17e3f.
why the source ptr provided by mmap is unavailable? I'd like to reproduce this issue in my local dev, could you help provide a quick guide for this: whether I only need to read the docs/backend/SYCL.md? |
your explanation in #12734 is very clear, thanks so much. |
fix it by use host buf.