This repository was archived by the owner on Nov 4, 2024. It is now read-only.
Commit b3bef22 1 parent 46fccbb commit b3bef22 Copy full SHA for b3bef22
File tree 5 files changed +40
-0
lines changed
5 files changed +40
-0
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,11 @@ using FillArrays, Zygote # Extensions
57
57
@test ps_xpu. e == ps. e
58
58
@test ps_xpu. d == ps. d
59
59
@test ps_xpu. rng_default isa rngType
60
+ @test get_device (ps_xpu. rng_default) isa AMDGPUDevice
61
+ @test get_device_type (ps_xpu. rng_default) <: AMDGPUDevice
60
62
@test ps_xpu. rng == ps. rng
63
+ @test get_device (ps_xpu. rng) === nothing
64
+ @test get_device_type (ps_xpu. rng) <: Nothing
61
65
62
66
if MLDataDevices. functional (AMDGPUDevice)
63
67
@test ps_xpu. one_elem isa ROCArray
@@ -83,7 +87,11 @@ using FillArrays, Zygote # Extensions
83
87
@test ps_cpu. e == ps. e
84
88
@test ps_cpu. d == ps. d
85
89
@test ps_cpu. rng_default isa Random. TaskLocalRNG
90
+ @test get_device (ps_cpu. rng_default) === nothing
91
+ @test get_device_type (ps_cpu. rng_default) <: Nothing
86
92
@test ps_cpu. rng == ps. rng
93
+ @test get_device (ps_cpu. rng) === nothing
94
+ @test get_device_type (ps_cpu. rng) <: Nothing
87
95
88
96
if MLDataDevices. functional (AMDGPUDevice)
89
97
@test ps_cpu. one_elem isa Array
Original file line number Diff line number Diff line change @@ -56,7 +56,11 @@ using FillArrays, Zygote # Extensions
56
56
@test ps_xpu. e == ps. e
57
57
@test ps_xpu. d == ps. d
58
58
@test ps_xpu. rng_default isa rngType
59
+ @test get_device (ps_xpu. rng_default) isa CUDADevice
60
+ @test get_device_type (ps_xpu. rng_default) <: CUDADevice
59
61
@test ps_xpu. rng == ps. rng
62
+ @test get_device (ps_xpu. rng) === nothing
63
+ @test get_device_type (ps_xpu. rng) <: Nothing
60
64
61
65
if MLDataDevices. functional (CUDADevice)
62
66
@test ps_xpu. one_elem isa CuArray
@@ -82,7 +86,11 @@ using FillArrays, Zygote # Extensions
82
86
@test ps_cpu. e == ps. e
83
87
@test ps_cpu. d == ps. d
84
88
@test ps_cpu. rng_default isa Random. TaskLocalRNG
89
+ @test get_device (ps_cpu. rng_default) === nothing
90
+ @test get_device_type (ps_cpu. rng_default) <: Nothing
85
91
@test ps_cpu. rng == ps. rng
92
+ @test get_device (ps_cpu. rng) === nothing
93
+ @test get_device_type (ps_cpu. rng) <: Nothing
86
94
87
95
if MLDataDevices. functional (CUDADevice)
88
96
@test ps_cpu. one_elem isa Array
Original file line number Diff line number Diff line change @@ -55,7 +55,11 @@ using FillArrays, Zygote # Extensions
55
55
@test ps_xpu. e == ps. e
56
56
@test ps_xpu. d == ps. d
57
57
@test ps_xpu. rng_default isa rngType
58
+ @test get_device (ps_xpu. rng_default) isa MetalDevice
59
+ @test get_device_type (ps_xpu. rng_default) <: MetalDevice
58
60
@test ps_xpu. rng == ps. rng
61
+ @test get_device (ps_xpu. rng) === nothing
62
+ @test get_device_type (ps_xpu. rng) <: Nothing
59
63
60
64
if MLDataDevices. functional (MetalDevice)
61
65
@test ps_xpu. one_elem isa MtlArray
@@ -81,7 +85,11 @@ using FillArrays, Zygote # Extensions
81
85
@test ps_cpu. e == ps. e
82
86
@test ps_cpu. d == ps. d
83
87
@test ps_cpu. rng_default isa Random. TaskLocalRNG
88
+ @test get_device (ps_cpu. rng_default) === nothing
89
+ @test get_device_type (ps_cpu. rng_default) <: Nothing
84
90
@test ps_cpu. rng == ps. rng
91
+ @test get_device (ps_cpu. rng) === nothing
92
+ @test get_device_type (ps_cpu. rng) <: Nothing
85
93
86
94
if MLDataDevices. functional (MetalDevice)
87
95
@test ps_cpu. one_elem isa Array
Original file line number Diff line number Diff line change @@ -55,7 +55,11 @@ using FillArrays, Zygote # Extensions
55
55
@test ps_xpu. e == ps. e
56
56
@test ps_xpu. d == ps. d
57
57
@test ps_xpu. rng_default isa rngType
58
+ @test get_device (ps_xpu. rng_default) isa oneAPIDevice
59
+ @test get_device_type (ps_xpu. rng_default) <: oneAPIDevice
58
60
@test ps_xpu. rng == ps. rng
61
+ @test get_device (ps_xpu. rng) === nothing
62
+ @test get_device_type (ps_xpu. rng) <: Nothing
59
63
60
64
if MLDataDevices. functional (oneAPIDevice)
61
65
@test ps_xpu. one_elem isa oneArray
@@ -81,7 +85,11 @@ using FillArrays, Zygote # Extensions
81
85
@test ps_cpu. e == ps. e
82
86
@test ps_cpu. d == ps. d
83
87
@test ps_cpu. rng_default isa Random. TaskLocalRNG
88
+ @test get_device (ps_cpu. rng_default) === nothing
89
+ @test get_device_type (ps_cpu. rng_default) <: Nothing
84
90
@test ps_cpu. rng == ps. rng
91
+ @test get_device (ps_cpu. rng) === nothing
92
+ @test get_device_type (ps_cpu. rng) <: Nothing
85
93
86
94
if MLDataDevices. functional (oneAPIDevice)
87
95
@test ps_cpu. one_elem isa Array
Original file line number Diff line number Diff line change @@ -54,7 +54,11 @@ using FillArrays, Zygote # Extensions
54
54
@test ps_xpu. e == ps. e
55
55
@test ps_xpu. d == ps. d
56
56
@test ps_xpu. rng_default isa rngType
57
+ @test get_device (ps_xpu. rng_default) === nothing
58
+ @test get_device_type (ps_xpu. rng_default) <: Nothing
57
59
@test ps_xpu. rng == ps. rng
60
+ @test get_device (ps_xpu. rng) === nothing
61
+ @test get_device_type (ps_xpu. rng) <: Nothing
58
62
59
63
if MLDataDevices. functional (XLADevice)
60
64
@test ps_xpu. one_elem isa Reactant. RArray
@@ -80,7 +84,11 @@ using FillArrays, Zygote # Extensions
80
84
@test ps_cpu. e == ps. e
81
85
@test ps_cpu. d == ps. d
82
86
@test ps_cpu. rng_default isa Random. TaskLocalRNG
87
+ @test get_device (ps_cpu. rng_default) === nothing
88
+ @test get_device_type (ps_cpu. rng_default) <: Nothing
83
89
@test ps_cpu. rng == ps. rng
90
+ @test get_device (ps_cpu. rng) === nothing
91
+ @test get_device_type (ps_cpu. rng) <: Nothing
84
92
85
93
if MLDataDevices. functional (XLADevice)
86
94
@test ps_cpu. one_elem isa Array
You can’t perform that action at this time.
0 commit comments