question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

What should I do when backend_input_collector return need_cuda_input_sync of True value?

See original GitHub issue

I am developing a customized backend using c++. After calling the backend util function backend_input_collector.Finalized(),I got the returned variable need_cuda_input_sync of value True. In the customed backend official examples,the code are all for backends running on cpu. As you can see in the demo code: image

This customized backend is orchestrated after a model on gpu in an outer ensemble model and I need to fetch buffer from gpu. So what should I do when I received the need_cuda_input_sync variable of True value?

More to add: If I ignore this need_cuda_input_sync flag and continue the logic,when the server is concurrently called, the server will run into a core dump issue as below: 7d7999c71903e519d936c0edf6fe85bb

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
rmccorm4commented, Aug 22, 2022

Hi @frankxyy ,

As the comment points out, you’ll need to synchronize the CUDA stream/event if collector.Finalize() returns true.

Taking a look at some other backends that do this may be useful, such as ONNXRuntime: https://github.com/triton-inference-server/onnxruntime_backend/blob/main/src/onnxruntime.cc#L2034

CC @tanmayv25

0reactions
rmccorm4commented, Sep 13, 2022

Closing as this seems resolved, please open a new issue for any new questions.

Read more comments on GitHub >

github_iconTop Results From Across the Web

No results found

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found