Add plotting and generate plots
This commit is contained in:
@ -10,7 +10,7 @@ function test_known_graphs()
|
||||
|
||||
@test length(g_ABAB.nodes) == 34
|
||||
@test props.compute_effort == 185
|
||||
@test props.data == 102
|
||||
@test props.data == 0x68
|
||||
|
||||
@test length(get_operations(g_ABAB).nodeFusions) == 10
|
||||
|
||||
@ -23,7 +23,7 @@ function test_known_graphs()
|
||||
|
||||
@test length(g_ABAB3.nodes) == 280
|
||||
@test props.compute_effort == 2007
|
||||
@test props.data == 828
|
||||
@test props.data == 0x498
|
||||
|
||||
test_node_fusion(g_ABAB3)
|
||||
test_random_walk(g_ABAB3, 1000)
|
||||
@ -39,7 +39,7 @@ function test_node_fusion(g::DAG)
|
||||
compute_effort = props.compute_effort
|
||||
|
||||
while !isempty(options.nodeFusions)
|
||||
fusion = options.nodeFusions[1]
|
||||
fusion = pop!(options.nodeFusions)
|
||||
|
||||
@test typeof(fusion) <: NodeFusion
|
||||
|
||||
@ -75,11 +75,11 @@ function test_random_walk(g::DAG, n::Int64)
|
||||
# choose one of fuse/split/reduce
|
||||
option = rand(1:3)
|
||||
if option == 1 && !isempty(opt.nodeFusions)
|
||||
push_operation!(g, opt.nodeFusions[rand(1 : length(opt.nodeFusions))])
|
||||
push_operation!(g, rand(collect(opt.nodeFusions)))
|
||||
elseif option == 2 && !isempty(opt.nodeReductions)
|
||||
push_operation!(g, opt.nodeReductions[rand(1 : length(opt.nodeReductions))])
|
||||
push_operation!(g, rand(collect(opt.nodeReductions)))
|
||||
elseif option == 3 && !isempty(opt.nodeSplits)
|
||||
push_operation!(g, opt.nodeSplits[rand(1 : length(opt.nodeSplits))])
|
||||
push_operation!(g, rand(collect(opt.nodeSplits)))
|
||||
else
|
||||
i = i-1
|
||||
end
|
||||
|
Reference in New Issue
Block a user