Skip to content

Conversation

@JackCaoG
Copy link
Collaborator

@JackCaoG JackCaoG commented Jun 17, 2023

I think having an internal API to dump XLATensor info is useful in debugging, it can dump something similar to

XLATensor {
TensorID: 5
Device: CPU:0
XLA Shape: f32[5]
IR: [] aten::add, xla_shape=f32[5]{0}
XLAData: None
Tensor on host: None
}

I didn't include view since I assume view will not be there after we clean up the functionization pass.

@JackCaoG
Copy link
Collaborator Author

I can also add a test on Monday, context is I am debugging a SPMD issue and I can't figure out why XLAData is a placeholder when it shouldn't, so I created this API

@JackCaoG
Copy link
Collaborator Author

@wonjoolee95 @alanwaketan This should be ready to review now.

@JackCaoG JackCaoG marked this pull request as ready for review June 20, 2023 18:51
Copy link
Collaborator

@alanwaketan alanwaketan left a comment

Choose a reason for hiding this comment

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

LGTM.

@JackCaoG JackCaoG merged commit 9e588be into master Jun 20, 2023
ManfeiBai pushed a commit that referenced this pull request Jun 22, 2023
* Add tesor debugging util API

* Add test of _get_xla_tensor_debug_info

* fix typo

* Disable the test for eager debug mode
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.

4 participants