-
Notifications
You must be signed in to change notification settings - Fork 0
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
Segfault when running CxxWrap example #3
Comments
Hi, rossviljoen, have you ever compiled and run ./cxx_example successfully |
Hi! Yes, I am able to run that example using version |
@rossviljoen Errors may occur when you run an empty graph. You need add non-empty graph just like the function TensorAddExample and CreateTensorAddGraph in https://github.com/cambridge-mlg/MindSpore.jl/blob/master/ms_cxx_graph_api_example/main.cc. Also you can try an empty graph with c++ interface and check if the error is created from this problem. |
I can confirm that running an empty graph with the c++ interface doesn't error and seems to work fine. See the code for this here I think that the error comes from limitations in Julia's C++ FFI CxxWrap.jl - I think that this is probably not a MindSpore issue. Many thanks for the help though! |
@rossviljoen can you try to call these C++ functions via |
@yebai @rossviljoen The link is how to realize the Julia AD https://rogerluo.dev/Brochure.jl/dev/automatic-differentiation/#%E5%8A%A8%E6%80%81%E5%9B%BE-VS-%E9%9D%99%E6%80%81%E5%9B%BE-1 |
When running
CxxWrapExample/src/example.jl
:This appears to be a segfault when attempting to run the VM that is produced after compiling the graph. In this case, the graph is empty (has no operations) - but it is possible to execute a blank graph directly from C++ (see CxxWrapExample/ccsrc/main.cc)
The text was updated successfully, but these errors were encountered: