mirror of
https://github.com/zebrajr/pytorch.git
synced 2026-01-15 12:15:51 +00:00
consolidate ATen/test/dispatch_key_set_test.cpp with rest of DispatchKeySet tests (#151697)
Doesn't seem to be a reason to have two test files for this. Differential Revision: [D73274020](https://our.internmc.facebook.com/intern/diff/D73274020/) Pull Request resolved: https://github.com/pytorch/pytorch/pull/151697 Approved by: https://github.com/Skylion007 ghstack dependencies: #151626, #151627, #151628, #151629, #151630
This commit is contained in:
committed by
PyTorch MergeBot
parent
9c2ac2b876
commit
8eb21dffa9
@@ -443,3 +443,13 @@ TEST(DispatchKeySet, TestFunctionalityDispatchKeyToString) {
|
||||
seen_strings.insert(res);
|
||||
}
|
||||
}
|
||||
|
||||
TEST(DispatchKeySet, TestGetRuntimeDispatchKeySet) {
|
||||
// Check if getRuntimeDispatchKeySet and runtimeDispatchKeySetHas agree.
|
||||
for (auto dk1 : DispatchKeySet(DispatchKeySet::FULL)) {
|
||||
auto dks = getRuntimeDispatchKeySet(dk1);
|
||||
for (auto dk2 : DispatchKeySet(DispatchKeySet::FULL)) {
|
||||
ASSERT_EQ(dks.has(dk2), runtimeDispatchKeySetHas(dk1, dk2));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user