[Bug] [[Meta-schedule][Feature extraction] Incorrect Assignment of is_gpu Property #17592
Labels
needs-triage
PRs or issues that need to be investigated by maintainers to find the right assignees to address it
type: bug
Bug Description: Incorrect Assignment of
is_gpu
PropertySummary:
In the context of feature extraction using
meta_schedule
, theis_gpu
property was incorrectly assigned by directly comparing the target kind name to"cuda"
. This approach is not only too specific but also potentially unsafe, as it does not account for different GPU types or handle cases where the target might be undefined.Incorrect Code:
tvm/src/meta_schedule/feature_extractor/per_store_feature.cc
Line 1395 in 567eeed
Problems with the Incorrect Code:
"cuda"
and can vary based on library versions or configurations.Correct Implementation:
Explanation of Correct Code:
The corrected code checks if
"gpu"
exists within the list of keys associated with the target. This method is more robust because:"gpu"
in its keys, regardless of the underlying hardware or software platform.kind->name
.The text was updated successfully, but these errors were encountered: