Skip to content

Enable additional mul_mat tests and add tensor data saving function#74

Closed
zhaixuejun1993 wants to merge 1 commit intoravi9:masterfrom
zhaixuejun1993:xuejun/enable_mul_mat_op_test
Closed

Enable additional mul_mat tests and add tensor data saving function#74
zhaixuejun1993 wants to merge 1 commit intoravi9:masterfrom
zhaixuejun1993:xuejun/enable_mul_mat_op_test

Conversation

@zhaixuejun1993
Copy link
Copy Markdown
Collaborator

This pull request introduces several improvements and bug fixes to the OpenVINO integration in the ggml library, focusing on tensor handling, operation support, and utility enhancements. The most important changes include fixing tensor output handling in naive compute mode, improving permute operation translation, and adding a utility for saving tensor data to text files.

Tensor output handling and utilities:

  • Fixed the output tensor handling in naive_compute by copying data directly from the OpenVINO output tensor to the ggml_tensor after inference, instead of relying on set_output_tensor, which currently does not work in naive mode.
  • Added a new utility function save_ggml_tensor_data_to_txt for exporting tensor data to a text file, supporting multiple tensor types. Declaration added to utils.h. [1] [2]

Operation support and translation:

  • Improved translation of the permute operation in permute.cpp by dynamically constructing the permutation vector from operation parameters if available, allowing more flexible permute handling.
  • Removed the check for unsupported permute operations in is_op_unsupported_case, enabling permute operations to be processed by OpenVINO.

General improvements:

  • Added missing include for <vector> in permute.cpp to support dynamic permutation vector construction.
  • Added missing include for <fstream> in utils.cpp to support file output in the new tensor saving utility.…bugging

Make sure to read the contributing guidelines before submitting a PR

infer_request->set_input_tensor(i, input_tensor);
}

// TODO: Need to check why set_output_tensor() doesn't work in naive mode. For now, we will create output tensors after infer() and copy data back to ggml tensors.
Copy link
Copy Markdown
Collaborator

@wine99 wine99 Mar 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can you update the comments here since we have figured out the reason of failing. otherwise lgtm. you can merge by yourself later

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants