File tree Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Expand file tree Collapse file tree 2 files changed +16
-3
lines changed Original file line number Diff line number Diff line change 1- # define ZE_MAKE_VERSION( _major, _minor ) (( _major << 16 )|( _minor & 0x0000ffff))
1+ """
2+ ze_make_version(major::Integer, minor::Integer) -> UInt32
3+
4+ 32-bit unsigned integer version number from major and minor components.
5+ This should be the Julia equivalent of the C macro:
6+ `#define ZE_MAKE_VERSION( _major, _minor ) (( _major << 16 )|( _minor & 0x0000ffff))`
7+ """
8+ function ZE_MAKE_VERSION (major:: Integer , minor:: Integer )
9+ # Shift the major version 16 bits to the left
10+ # and combine it with the minor version using a bitwise OR.
11+ # The `& 0xffff` is implicit for standard integer types when combining,
12+ # but we can be explicit if needed. The result is cast to UInt32.
13+ return (UInt32 (major) << 16 ) | (UInt32 (minor) & 0x0000ffff )
14+ end
215unmake_version (ver) = VersionNumber (Int (ver) >> 16 , Int (ver) & 0x0000ffff )
Original file line number Diff line number Diff line change 1515 using oneAPI_Level_Zero_Loader_jll
1616end
1717
18+ include (" common.jl" )
1819include (" utils.jl" )
1920include (" pointer.jl" )
2021
8586
8687# core wrappers
8788include (" error.jl" )
88- include (" common.jl" )
8989include (" driver.jl" )
9090include (" device.jl" )
9191include (" context.jl" )
@@ -131,7 +131,7 @@ function __init__()
131131 zeInit (0 )
132132 functional[] = true
133133 catch err
134- @error " Failed to initialize oneAPI" exception = (err, catch_backtrace ())
134+ @warn " Failed to initialize oneAPI"
135135 functional[] = false
136136 return
137137 end
You can’t perform that action at this time.
0 commit comments