Been playing with oneAPI.jl to run matrix x vector multiplication using the integrated Intel GPU on my Windows laptop (WSL2) and came across a strange behavior.
The first time mul!() is invoked I get a reasonable result, all subsequent calls return zeros and when I exit Julia by calling exit()
I get a segmentation fault.
Here’s a repro example:
using Random, Distributions, LinearAlgebra, oneAPI, BenchmarkTools
row_count = 768
coeff_count = 80
rep_coeffs = rand(Normal(200, 20), coeff_count)
w_vals = 5 .+ (1.5 .* randn(row_count, coeff_count) .^ 2)
res = zeros(row_count)
rep_coeffs_f32 = oneArray(Float32.(rep_coeffs))
w_vals_f32 = oneArray(Float32.(w_vals))
res_f32 = oneArray(zeros(Float32, row_count))
mul!(res_f32, w_vals_f32, rep_coeffs_f32)
mul!(res, w_vals, rep_coeffs)
maximum(abs.(res - Float64.(Array(res_f32)))) < .025
mul!(res_f32, w_vals_f32, rep_coeffs_f32)
mul!(res, w_vals, rep_coeffs)
maximum(abs.(res - Float64.(Array(res_f32)))) < .025
Second check of maximum squared diff returns false.
Has anyone else seen this? Is there anything I am doing here that could be problematic?