Skip to content

re-enable debugging for dml #1348

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

aciddelgado
Copy link
Contributor

this was removed in a prior change.

baijumeswani
baijumeswani previously approved these changes Mar 27, 2025
// 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
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
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
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);

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