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

fix bug of evaluate user model #444

Merged
merged 3 commits into from
Feb 18, 2025
Merged

fix bug of evaluate user model #444

merged 3 commits into from
Feb 18, 2025

Conversation

n1ck-guo
Copy link
Contributor

No description provided.

Signed-off-by: n1ck-guo <heng.guo@intel.com>
device_str = None
device_str = None
else:
device_str = detect_device(devices[0])
Copy link
Contributor

Choose a reason for hiding this comment

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

it is quite confusing if device is set to 0,1 and detect_device return 0?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

if multi card or auto set, will return None. If only one card set, will return like cuda:1.

Copy link
Contributor

@wenhuach21 wenhuach21 Feb 17, 2025

Choose a reason for hiding this comment

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

then why using devices[0] not devices

Copy link
Contributor

@wenhuach21 wenhuach21 Feb 17, 2025

Choose a reason for hiding this comment

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

if the device is set to "cpu" or "hpu", is devices[0] still correct?

device_str = None
device_str = None
else:
device_str = detect_device(devices[0])
elif device == "auto":
device_str = None
Copy link
Contributor

Choose a reason for hiding this comment

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

why set_cuda_visible_devices also set parallelism, it's not a good coding style. Set cuda visible device first, then set parallelism.
Similar coding style issue in detect_devices

Signed-off-by: n1ck-guo <heng.guo@intel.com>
Signed-off-by: n1ck-guo <heng.guo@intel.com>
@wenhuach21 wenhuach21 self-requested a review February 18, 2025 09:41
@wenhuach21 wenhuach21 merged commit 9aa8803 into main Feb 18, 2025
8 checks passed
@wenhuach21 wenhuach21 deleted the hengguo/bugfix_0217 branch February 18, 2025 09:41
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