Skip to content
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

Add debugging helper to dump string, vector and thread id #21224

Merged
merged 1 commit into from
Jul 2, 2024

Conversation

tianleiwu
Copy link
Contributor

Description

Add some macro to help print data to console for debugging purpose.

Example usage:

int input_id;
vector<int> some_vector;

DUMP_CPU_TENSOR_INIT()
DUMP_CPU_TENSOR("some vector", some_vector);
DUMP_STRING("input_id=", input_id);
  • To enable dump thread id, set environment variable ORT_DUMP_THREAD_ID=0.
  • User can disable dumping by environment variable ORT_ENABLE_CPU_DUMP=0.

Motivation and Context

@tianleiwu tianleiwu force-pushed the tlwu/dump_string_vector_thead_id branch from e954e29 to d6d4027 Compare July 1, 2024 19:11
@tianleiwu tianleiwu merged commit 7df97f1 into main Jul 2, 2024
96 of 100 checks passed
@tianleiwu tianleiwu deleted the tlwu/dump_string_vector_thead_id branch July 2, 2024 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants