@@ -27,31 +27,6 @@ template <typename T> T *getPointerFromVector(std::vector<T> &V) {
2727 return V.size () == 0 ? nullptr : V.data ();
2828}
2929
30- /* *
31- * Checks the version of the level-zero driver.
32- * @param[in] Context Execution context
33- * @param[in] VersionMajor Major version number to compare to.
34- * @param[in] VersionMinor Minor version number to compare to.
35- * @param[in] VersionBuild Build version number to compare to.
36- * @return true if the version of the driver is higher than or equal to the
37- * compared version.
38- */
39- bool isDriverVersionNewerOrSimilar (ur_context_handle_t Context,
40- uint32_t VersionMajor, uint32_t VersionMinor,
41- uint32_t VersionBuild) {
42- ZeStruct<ze_driver_properties_t > ZeDriverProperties;
43- ZE2UR_CALL (zeDriverGetProperties,
44- (Context->getPlatform ()->ZeDriver , &ZeDriverProperties));
45- uint32_t DriverVersion = ZeDriverProperties.driverVersion ;
46- auto DriverVersionMajor = (DriverVersion & 0xFF000000 ) >> 24 ;
47- auto DriverVersionMinor = (DriverVersion & 0x00FF0000 ) >> 16 ;
48- auto DriverVersionBuild = DriverVersion & 0x0000FFFF ;
49-
50- return ((DriverVersionMajor >= VersionMajor) &&
51- (DriverVersionMinor >= VersionMinor) &&
52- (DriverVersionBuild >= VersionBuild));
53- }
54-
5530/* *
5631 * Default to using compute engine for fill operation, but allow to override
5732 * this with an environment variable. Disable the copy engine if the pattern
@@ -637,7 +612,8 @@ ur_result_t createMainCommandList(ur_context_handle_t Context,
637612bool canBeInOrder (ur_context_handle_t Context,
638613 const ur_exp_command_buffer_desc_t *CommandBufferDesc) {
639614 // In-order command-lists are not available in old driver version.
640- bool CompatibleDriver = isDriverVersionNewerOrSimilar (Context, 1 , 3 , 28454 );
615+ bool CompatibleDriver = isDriverVersionNewerOrSimilar (
616+ Context->getPlatform ()->ZeDriver , 1 , 3 , L0_DRIVER_INORDER_MIN_VERSION);
641617 return CompatibleDriver
642618 ? (CommandBufferDesc ? CommandBufferDesc->isInOrder : false )
643619 : false ;
0 commit comments