Skip to content

re-enable debugging for dml#1348

Closed
aciddelgado wants to merge 2 commits intomainfrom
aciddelgado/dml_debugging
Closed

re-enable debugging for dml#1348
aciddelgado wants to merge 2 commits intomainfrom
aciddelgado/dml_debugging

Conversation

@aciddelgado
Copy link
Copy Markdown
Contributor

this was removed in a prior change.

baijumeswani
baijumeswani previously approved these changes Mar 27, 2025
Comment thread src/models/debugging.cpp
// https://github.com/microsoft/onnxruntime/blob/9dbfee91ca9c2ba2074d19805bb6dedccedbcfe3/include/onnxruntime/core/framework/ortdevice.h#L15
} else if (memory_info.GetDeviceType() < 5) {
switch (model.p_device_->GetType()) {
case DeviceType::CUDA:
Copy link
Copy Markdown
Collaborator

@baijumeswani baijumeswani Mar 27, 2025

Choose a reason for hiding this comment

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

Shall we try to define a model.p_device_->GetType<std::string>() for each device type? We can avoid the switch statement here then.

stream << model.p_device_->GetType<std::string>() << "\r\n";

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

I think we can fairly safely say that if the tensor is not on CPU, it's on the model.p_device_

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Oh, I see. We shouldn't use a switch here, use this:

std::string to_string(DeviceType device_type);

@baijumeswani
Copy link
Copy Markdown
Collaborator

i believe this change might have been reverted in ort. closing this.

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.

3 participants