Skip to content

Commit 7cf9c3b

Browse files
committed
Fix Julia 1.12 issues
1 parent 3d3278d commit 7cf9c3b

File tree

3 files changed

+9
-9
lines changed

3 files changed

+9
-9
lines changed

lib/level-zero/pointer.jl

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -40,8 +40,8 @@ Base.eltype(::Type{<:ZePtr{T}}) where {T} = T
4040
Base.convert(::Type{T}, x::ZePtr) where {T<:Integer} = T(UInt(x))
4141
## integer to pointer
4242
Base.convert(::Type{ZePtr{T}}, x::Union{Int,UInt}) where {T} = ZePtr{T}(x)
43-
Int(x::ZePtr) = Base.bitcast(Int, x)
44-
UInt(x::ZePtr) = Base.bitcast(UInt, x)
43+
Base.Int(x::ZePtr) = Base.bitcast(Int, x)
44+
Base.UInt(x::ZePtr) = Base.bitcast(UInt, x)
4545

4646
# between regular and oneAPI pointers
4747
Base.convert(::Type{<:Ptr}, p::ZePtr) =
@@ -71,8 +71,8 @@ Base.:(==)(x::ZePtr, y::ZePtr) = UInt(x) == UInt(y)
7171
Base.:(<)(x::ZePtr, y::ZePtr) = UInt(x) < UInt(y)
7272
Base.:(-)(x::ZePtr, y::ZePtr) = UInt(x) - UInt(y)
7373

74-
Base.:(+)(x::ZePtr, y::Integer) = oftype(x, Base.add_ptr(UInt(x), (y % UInt) % UInt))
75-
Base.:(-)(x::ZePtr, y::Integer) = oftype(x, Base.sub_ptr(UInt(x), (y % UInt) % UInt))
74+
Base.:(+)(x::ZePtr, y::Integer) = oftype(x, UInt(x) + (y % UInt) % UInt)
75+
Base.:(-)(x::ZePtr, y::Integer) = oftype(x, UInt(x) - (y % UInt) % UInt)
7676
Base.:(+)(x::Integer, y::ZePtr) = y + x
7777

7878

lib/mkl/wrappers_sparse.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ for (fname, elty, intty) in ((:onemklSsparse_set_csr_data , :Float32 , :Int3
2929
return dA
3030
end
3131

32-
function SparseMatrixCSC(A::oneSparseMatrixCSR{$elty, $intty})
32+
function SparseArrays.SparseMatrixCSC(A::oneSparseMatrixCSR{$elty, $intty})
3333
handle_ptr = Ref{matrix_handle_t}()
3434
At = SparseMatrixCSC(reverse(A.dims)..., Vector(A.rowPtr), Vector(A.colVal), Vector(A.nzVal))
3535
A_csc = SparseMatrixCSC(At |> transpose)
@@ -63,7 +63,7 @@ for (fname, elty, intty) in ((:onemklSsparse_set_coo_data , :Float32 , :Int3
6363
return dA
6464
end
6565

66-
function SparseMatrixCSC(A::oneSparseMatrixCOO{$elty, $intty})
66+
function SparseArrays.SparseMatrixCSC(A::oneSparseMatrixCOO{$elty, $intty})
6767
handle_ptr = Ref{matrix_handle_t}()
6868
A = sparse(Vector(A.rowInd), Vector(A.colInd), Vector(A.nzVal), A.dims...)
6969
return A

src/broadcast.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ struct oneArrayStyle{N,B} <: AbstractGPUArrayStyle{N} end
66
oneArrayStyle{M,B}(::Val{N}) where {N,M,B} = oneArrayStyle{N,B}()
77

88
# identify the broadcast style of a (wrapped) oneArray
9-
BroadcastStyle(::Type{<:oneArray{T,N,B}}) where {T,N,B} = oneArrayStyle{N,B}()
10-
BroadcastStyle(W::Type{<:oneWrappedArray{T,N}}) where {T,N} =
9+
Broadcast.BroadcastStyle(::Type{<:oneArray{T,N,B}}) where {T,N,B} = oneArrayStyle{N,B}()
10+
Broadcast.BroadcastStyle(W::Type{<:oneWrappedArray{T,N}}) where {T,N} =
1111
oneArrayStyle{N, buftype(Adapt.unwrap_type(W))}()
1212

1313
# when we are dealing with different buffer styles, we cannot know
1414
# which one is better, so use shared memory
15-
BroadcastStyle(::oneArrayStyle{N, B1},
15+
Broadcast.BroadcastStyle(::oneArrayStyle{N, B1},
1616
::oneArrayStyle{N, B2}) where {N,B1,B2} =
1717
oneArrayStyle{N, oneL0.SharedBuffer}()
1818

0 commit comments

Comments
 (0)