Skip to content

Commit 11f677a

Browse files
Cleanup some imports (#398)
1 parent 0c4d5e7 commit 11f677a

File tree

6 files changed

+6
-13
lines changed

6 files changed

+6
-13
lines changed

lib/mps/command_buf.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ end
3434
MTL.enqueue!(cmdbuf::MPSCommandBuffer) = @inline MTL.enqueue!(cmdbuf.commandBuffer)
3535
MTL.commit!(cmdbuf::MPSCommandBuffer) = @inline MTL.commit!(cmdbuf.commandBuffer)
3636

37-
function MPS.commit!(f::Base.Callable, cmdbuf::MPSCommandBuffer)
37+
function MTL.commit!(f::Base.Callable, cmdbuf::MPSCommandBuffer)
3838
enqueue!(cmdbuf)
3939
ret = f(cmdbuf)
4040
commit!(cmdbuf)

lib/mps/matrix.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ for type in [UInt8,UInt16,UInt32,UInt64,Int8,Int16,Int32,Int64,Float16,Float32,C
4242
@eval Base.convert(::Type{MPSDataType}, ::Type{$type}) = $(Symbol(:MPSDataType, type))
4343
@eval jl_mps_to_typ[$(Symbol(:MPSDataType, type))] = $type
4444
end
45-
Base.sizeof(t::MPS.MPSDataType) = sizeof(jl_mps_to_typ[t])
45+
Base.sizeof(t::MPSDataType) = sizeof(jl_mps_to_typ[t])
4646

4747
Base.convert(::Type{DataType}, mpstyp::MPSDataType) = jl_mps_to_typ[mpstyp]
4848

src/compiler/library.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,9 @@
1313

1414
using SHA: sha256
1515
using CEnum: @cenum
16-
using UUIDs: UUID, uuid1
16+
using UUIDs: UUID
1717
using Printf: @printf
18-
using CodecBzip2: transcode, Bzip2Compressor, Bzip2Decompressor
18+
using CodecBzip2: Bzip2Compressor, Bzip2Decompressor
1919

2020

2121
## enums

src/compiler/reflection.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ function extract_gpu_code(f, binary)
111111
metallib_section = findfirst(Sections(fat_handle[arch]), "__TEXT,__metallib")
112112
metallib_section === nothing && error("Could not find __metallib section in GPU binary")
113113
metallib_binary = read(metallib_section)
114-
metallib = read(IOBuffer(metallib_binary), Metal.MetalLib)
114+
metallib = read(IOBuffer(metallib_binary), MetalLib)
115115
# TODO: use this to implement a do-block device_code_air like CUDA.jl?
116116

117117
# identify the kernel name

src/gpuarrays.jl

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,6 @@ GPUArrays.griddim(ctx::mtlKernelContext) = threadgroups_per_grid_1d()
3333
GPUArrays.global_index(ctx::mtlKernelContext) = thread_position_in_grid_1d()
3434
GPUArrays.global_size(ctx::mtlKernelContext) = threads_per_grid_1d()
3535

36-
# math
37-
38-
@inline GPUArrays.cos(ctx::mtlKernelContext, x) = cos(x)
39-
@inline GPUArrays.sin(ctx::mtlKernelContext, x) = sin(x)
40-
@inline GPUArrays.sqrt(ctx::mtlKernelContext, x) = sqrt(x)
41-
@inline GPUArrays.log(ctx::mtlKernelContext, x) = log(x)
42-
4336
# memory
4437

4538
@inline function GPUArrays.LocalMemory(::mtlKernelContext, ::Type{T}, ::Val{dims}, ::Val{id}

src/mapreduce.jl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ end
3434
end
3535

3636
# wait for all partial reductions
37-
threadgroup_barrier(Metal.MemoryFlagThreadGroup)
37+
threadgroup_barrier(MemoryFlagThreadGroup)
3838

3939
# read from shared memory only if that warp existed
4040
val = if thread_index_in_threadgroup() <= fld1(threads_per_threadgroup_1d(), 32)

0 commit comments

Comments
 (0)