transpiler: results are now written in results array; preperation for performance testing
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-03-27 09:55:29 +01:00
parent baa37ea183
commit eaee21ca75
3 changed files with 61 additions and 32 deletions

View File

@ -24,11 +24,11 @@ parameters[2][2] = 0.0
postfixExpr = expr_to_postfix(expressions[1])
postfixExprs = Vector([postfixExpr])
push!(postfixExprs, expr_to_postfix(expressions[2]))
push!(postfixExprs, expr_to_postfix(:(5^3 + x1)))
push!(postfixExprs, expr_to_postfix(:(5^3 + x1 - p1)))
# generatedCode = Transpiler.transpile(postfixExpr)
generatedCode = Transpiler.transpile(postfixExprs[3], 2, 3) # TEMP
# println(generatedCode)
generatedCode = Transpiler.transpile(postfixExprs[3], 2, 3, 2, 3) # TEMP
println(generatedCode)
# CUDA.@sync interpret(postfixExprs, variables, parameters)
# This is just here for testing. This will be called inside the execute method in the Transpiler module
@ -42,11 +42,11 @@ parameters[2][2] = 0.0
end
@testset "Test transpiler evaluation" begin
postfixExprs = Vector{ExpressionProcessing.PostfixType}()
push!(postfixExprs, expr_to_postfix(expressions[1]))
push!(postfixExprs, expr_to_postfix(expressions[2]))
# postfixExprs = Vector{Expr}()
# push!(postfixExprs, expressions[1])
# push!(postfixExprs, expressions[2])
@time Transpiler.evaluate(postfixExprs, variables, parameters)
@time Transpiler.evaluate(expressions, variables, parameters)
end
#TODO: test performance of transpiler PTX generation when doing "return String(take!(buffer))" vs "return take!(buffer)"