@@ -237,6 +237,29 @@ end # invalidations
237237 end
238238 @test Array (c2) ≈ Array (a) + Array (b)
239239
240+ # @device_code_tiled with Type argument
241+ # Regression: compile hook reconstructed Constant{typeof(val), val} for Type
242+ # arguments, producing Constant{DataType, T} instead of Constant{Type{T}, T}
243+ # and failing with "requires a dispatch tuple, got non-concrete signature".
244+ function reflect_type_vadd (a:: ct.TileArray{Float32,1} , b:: ct.TileArray{Float32,1} ,
245+ c:: ct.TileArray{Float32,1} , :: Type{T} ) where T
246+ pid = ct. bid (1 )
247+ tile_a = ct. load (a, pid, (16 ,))
248+ tile_b = ct. load (b, pid, (16 ,))
249+ ct. store (c, pid, tile_a + tile_b + zeros (T, (16 ,)))
250+ return
251+ end
252+
253+ c3 = CUDA. zeros (Float32, n)
254+ @test @filecheck begin
255+ @check " entry @reflect_type_vadd"
256+ @check " load_view"
257+ @check " addf"
258+ @check " store_view"
259+ ct. @device_code_tiled ct. launch (reflect_type_vadd, cld (n, 16 ), a, b, c3, Float32)
260+ end
261+ @test Array (c3) ≈ Array (a) + Array (b)
262+
240263 # @device_code_tiled with reduce subprogram
241264 # Regression: compile hook tried to compile the reduce combiner (e.g. +) as a
242265 # standalone entry, which cuda-tile-translate rejects.
0 commit comments