2023-10-12 17:51:03 +02:00
|
|
|
{
|
|
|
|
"cells": [
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"using Revise; using MetagraphOptimization; using BenchmarkTools; using ProfileView\n",
|
|
|
|
"using Base.Threads\n",
|
|
|
|
"nthreads()"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
|
|
|
"model = ABCModel()\n",
|
|
|
|
"process_str = \"AB->ABBBBB\"\n",
|
|
|
|
"process = parse_process(process_str, model)\n",
|
|
|
|
"graph = parse_dag(\"../input/$process_str.txt\", model)\n",
|
|
|
|
"print(graph)"
|
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
2023-11-22 13:51:54 +01:00
|
|
|
"@ProfileView.profview optimize_to_fixpoint!(ReductionOptimizer(), graph)"
|
2023-10-12 17:51:03 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
2023-12-07 02:54:15 +01:00
|
|
|
"execution_count": null,
|
2023-10-12 17:51:03 +02:00
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": [
|
2023-12-07 02:54:15 +01:00
|
|
|
"@ProfileView.profview comp_func = get_compute_function(graph, process, get_machine_info())"
|
2023-10-12 17:51:03 +02:00
|
|
|
]
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"cell_type": "code",
|
|
|
|
"execution_count": null,
|
|
|
|
"metadata": {},
|
|
|
|
"outputs": [],
|
|
|
|
"source": []
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"metadata": {
|
|
|
|
"kernelspec": {
|
2024-05-08 12:03:27 +02:00
|
|
|
"display_name": "Julia 1.10.2",
|
2023-10-12 17:51:03 +02:00
|
|
|
"language": "julia",
|
2024-05-08 12:03:27 +02:00
|
|
|
"name": "julia-1.10"
|
2023-10-12 17:51:03 +02:00
|
|
|
},
|
|
|
|
"language_info": {
|
|
|
|
"file_extension": ".jl",
|
|
|
|
"mimetype": "application/julia",
|
|
|
|
"name": "julia",
|
2024-05-08 12:03:27 +02:00
|
|
|
"version": "1.10.2"
|
2023-10-12 17:51:03 +02:00
|
|
|
},
|
|
|
|
"orig_nbformat": 4
|
|
|
|
},
|
|
|
|
"nbformat": 4,
|
|
|
|
"nbformat_minor": 2
|
|
|
|
}
|