mllm
mllm copied to clipboard
printData and saveData error
When I execute outputs.printData<float>() or outputs.saveData<float>() on ouputs in the Forward function in the src/models/phonelm/modeling_phonelm.hpp/PhoneLMForCausalLM , a Segmentation fault occurs. How can I get the data of outputs ?
The execution logic of mllm is reshape -> setup -> exec. During the reshape phase, the memory corresponding to the tensor has not been created yet, which may lead to errors. You can write some helper functions to obtain the raw pointer, and store the tensor only when the pointer is not null.
Thank you! It is indeed caused by the null pointer.