@@ -1908,27 +1908,28 @@ void handler::verifyDeviceHasProgressGuarantee(
1908
1908
}
1909
1909
1910
1910
bool handler::supportsUSMMemcpy2D () {
1911
- assert (impl->MSubmissionPrimaryQueue &&
1912
- " handler should not have a null primary queue." );
1913
- return checkContextSupports (
1914
- impl->MSubmissionPrimaryQueue ->getContextImplPtr (),
1915
- UR_CONTEXT_INFO_USM_MEMCPY2D_SUPPORT);
1911
+ auto &PrimQueue = impl->MSubmissionPrimaryQueue ;
1912
+ if (PrimQueue)
1913
+ return checkContextSupports (PrimQueue->getContextImplPtr (),
1914
+ UR_CONTEXT_INFO_USM_MEMCPY2D_SUPPORT);
1915
+ else
1916
+ // Return true when handler_impl is constructed with a graph.
1917
+ return true ;
1916
1918
}
1917
1919
1918
1920
bool handler::supportsUSMFill2D () {
1919
- assert (impl->MSubmissionPrimaryQueue &&
1920
- " handler should not have a null primary queue." );
1921
- return checkContextSupports (
1922
- impl->MSubmissionPrimaryQueue ->getContextImplPtr (),
1923
- UR_CONTEXT_INFO_USM_FILL2D_SUPPORT);
1921
+ auto &PrimQueue = impl->MSubmissionPrimaryQueue ;
1922
+ if (PrimQueue)
1923
+ return checkContextSupports (PrimQueue->getContextImplPtr (),
1924
+ UR_CONTEXT_INFO_USM_FILL2D_SUPPORT);
1925
+ else
1926
+ // Return true when handler_impl is constructed with a graph.
1927
+ return true ;
1924
1928
}
1925
1929
1926
1930
bool handler::supportsUSMMemset2D () {
1927
- assert (impl->MSubmissionPrimaryQueue &&
1928
- " handler should not have a null primary queue." );
1929
- return checkContextSupports (
1930
- impl->MSubmissionPrimaryQueue ->getContextImplPtr (),
1931
- UR_CONTEXT_INFO_USM_FILL2D_SUPPORT);
1931
+ // memset use the same UR check as fill2D.
1932
+ return supportsUSMFill2D ();
1932
1933
}
1933
1934
1934
1935
id<2 > handler::computeFallbackKernelBounds (size_t Width, size_t Height) {
0 commit comments