diff --git a/test/device/intrinsics/atomics.jl b/test/device/intrinsics/atomics.jl index fa9813d9e..9d6bfa966 100644 --- a/test/device/intrinsics/atomics.jl +++ b/test/device/intrinsics/atomics.jl @@ -1,5 +1,3 @@ -using Random - @testset "atomics" begin n = 128 # NOTE: also hard-coded in MtlThreadGroupArray constructors diff --git a/test/device/intrinsics/math.jl b/test/device/intrinsics/math.jl index 765d2ea3c..db9942299 100644 --- a/test/device/intrinsics/math.jl +++ b/test/device/intrinsics/math.jl @@ -1,5 +1,4 @@ using Metal: metal_support -using Random using SpecialFunctions ############################################################################################ diff --git a/test/device/intrinsics/simd.jl b/test/device/intrinsics/simd.jl index bbae0a349..5107f60a0 100644 --- a/test/device/intrinsics/simd.jl +++ b/test/device/intrinsics/simd.jl @@ -1,5 +1,3 @@ -using Random - @testset "simd intrinsics" begin @testset "$f($typ)" for typ in [Float32, Float16, Int32, UInt32, Int16, UInt16, Int8, UInt8], (f,res_idx) in [(simd_shuffle_down, 1), (simd_shuffle_up, 32)] diff --git a/test/device/intrinsics/synchronization.jl b/test/device/intrinsics/synchronization.jl index 58f5dfe49..3a04084e0 100644 --- a/test/device/intrinsics/synchronization.jl +++ b/test/device/intrinsics/synchronization.jl @@ -1,4 +1,3 @@ -using Random @testset "synchronization" begin # host/device synchronization let diff --git a/test/mps/linalg.jl b/test/mps/linalg.jl index 90c6de9c6..061729661 100644 --- a/test/mps/linalg.jl +++ b/test/mps/linalg.jl @@ -1,5 +1,3 @@ -using LinearAlgebra - if MPS.is_supported(device()) @testset "mixed-precision matrix matrix multiplication" begin diff --git a/test/mps/ndarray.jl b/test/mps/ndarray.jl index 86fef4e61..15e6da55b 100644 --- a/test/mps/ndarray.jl +++ b/test/mps/ndarray.jl @@ -1,7 +1,6 @@ # # matrix descriptor # -using Metal using .MPS: MPSNDArrayDescriptor, MPSDataType, lengthOfDimension, descriptor, resourceSize @static if Metal.macos_version() >= v"15" using .MPS: userBuffer diff --git a/test/mpsgraphs/core.jl b/test/mpsgraphs/core.jl index ce716190b..7d9af92a7 100644 --- a/test/mpsgraphs/core.jl +++ b/test/mpsgraphs/core.jl @@ -1,4 +1,3 @@ - if MPS.is_supported(device()) using .MPS: MPSShape diff --git a/test/mpsgraphs/linalg.jl b/test/mpsgraphs/linalg.jl index 62438980e..f158c7980 100644 --- a/test/mpsgraphs/linalg.jl +++ b/test/mpsgraphs/linalg.jl @@ -1,6 +1,3 @@ -using LinearAlgebra - - if MPS.is_supported(device()) @testset "mixed-precision matrix matrix multiplication" begin diff --git a/test/mpsgraphs/random.jl b/test/mpsgraphs/random.jl index 4303ee83b..e9f12afdd 100644 --- a/test/mpsgraphs/random.jl +++ b/test/mpsgraphs/random.jl @@ -1,5 +1,3 @@ -using BFloat16s - if MPS.is_supported(device()) using .MPSGraphs: MPSGraphRandomOpDescriptor, MPSGraphRandomDistributionNormal, MPSGraphRandomDistributionTruncatedNormal, MPSGraphRandomDistributionUniform @@ -18,7 +16,7 @@ using .MPSGraphs: MPSGraphRandomOpDescriptor, MPSGraphRandomDistributionNormal, (MPSGraphRandomDistributionUniform, Float16), (MPSGraphRandomDistributionUniform, BFloat16), ] - @test MPSGraphRandomOpDescriptor(MPSGraphRandomDistributionNormal, Float32) isa MPSGraphRandomOpDescriptor + @test MPSGraphRandomOpDescriptor(dist, T) isa MPSGraphRandomOpDescriptor end end diff --git a/test/mtl/metal.jl b/test/mtl/metal.jl index 278ce34e7..4a18f1749 100644 --- a/test/mtl/metal.jl +++ b/test/mtl/metal.jl @@ -491,6 +491,6 @@ end # TODO: continue adding tests -end +end # @autoreleasepool begin -end +end # @testset "MTL" begin diff --git a/test/mtl/size.jl b/test/mtl/size.jl index b43fc35c2..efbb777fd 100644 --- a/test/mtl/size.jl +++ b/test/mtl/size.jl @@ -1,4 +1,3 @@ - @testset "size" begin dim1 = rand(UInt64) dim2 = rand(UInt64) diff --git a/test/profiling.jl b/test/profiling.jl index 72be12ea2..a48575cd2 100644 --- a/test/profiling.jl +++ b/test/profiling.jl @@ -30,8 +30,8 @@ cd(tmpdir) do @test isdir("julia_1.trace") end -end -end -end +end # cd(tmpdir) do +end # mktempdir() do tmpdir +end # if run_tests end diff --git a/test/setup.jl b/test/setup.jl index 4d56bcf20..462a584de 100644 --- a/test/setup.jl +++ b/test/setup.jl @@ -1,4 +1,4 @@ -using Distributed, Test, Metal, Adapt, ObjectiveC, ObjectiveC.Foundation +using Distributed, Test, Metal, Adapt, ObjectiveC, ObjectiveC.Foundation, BFloat16s # GPUArrays has a testsuite that isn't part of the main package. # Include it directly. diff --git a/test/version.jl b/test/version.jl index f72aef4a9..536ed22c5 100644 --- a/test/version.jl +++ b/test/version.jl @@ -1,4 +1,4 @@ -@testset "Version" begin +@testset "version" begin @test Metal.darwin_version() isa VersionNumber @test Metal.macos_version() isa VersionNumber @@ -8,4 +8,4 @@ @test Metal.air_support() isa VersionNumber @test Metal.metal_support() isa VersionNumber -end # testset "Version" +end # testset "version"