added support for variables and parameters as array. also improved conversion of variables and parameters into Expressionelement
Some checks are pending
CI / Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} (x64, ubuntu-latest, 1.10) (push) Waiting to run
CI / Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} (x64, ubuntu-latest, 1.6) (push) Waiting to run
CI / Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }} - ${{ github.event_name }} (x64, ubuntu-latest, pre) (push) Waiting to run

This commit is contained in:
2025-05-09 11:04:10 +02:00
parent aaa3f2c7c0
commit 2c8a9cd2d8
7 changed files with 101 additions and 67 deletions

View File

@ -45,10 +45,10 @@ end
# LinearAlgebra.BLAS.set_num_threads(1) # only use a single thread for peakflops
@test test_cpu_interpreter(1000)
@test test_cpu_interpreter(1000, parallel=true) # start julia -t 6 for six threads
@test test_cpu_interpreter(10000)
@test test_cpu_interpreter(10000, parallel=true)
# @test test_cpu_interpreter(1000)
# @test test_cpu_interpreter(1000, parallel=true) # start julia -t 6 for six threads
# @test test_cpu_interpreter(10000)
# @test test_cpu_interpreter(10000, parallel=true)
function test_cpu_interpreter_nikuradse()
@ -62,14 +62,25 @@ function test_cpu_interpreter_nikuradse()
# data/esr_nvar2_len10.txt.gz_9.txt.gz has ~250_000 exprs
# data/esr_nvar2_len10.txt.gz_10.txt.gz has ~800_000 exrps
GZip.open("data/esr_nvar2_len10.txt.gz_9.txt.gz") do io
i = 0
for line in eachline(io)
expr, p = parse_infix(line, varnames, paramnames)
if i > 10
return
end
println(expr)
push!(exprs, expr)
push!(parameters, randn(Float32, length(p)))
i += 1
end
end
interpret_cpu(exprs, X, parameters) # TODO: sufficient to do up to 10 repetitions per expression,
end
end
@test test_cpu_interpreter_nikuradse()