Spaces:
Running
Running
Tweak threading settings in colab
Browse files- examples/pysr_demo.ipynb +5 -2
examples/pysr_demo.ipynb
CHANGED
|
@@ -772,7 +772,8 @@
|
|
| 772 |
"the [Primes.jl](https://github.com/JuliaMath/Primes.jl) package.\n",
|
| 773 |
"\n",
|
| 774 |
"First, let's get the Julia backend\n",
|
| 775 |
-
"
|
|
|
|
| 776 |
]
|
| 777 |
},
|
| 778 |
{
|
|
@@ -782,7 +783,9 @@
|
|
| 782 |
"outputs": [],
|
| 783 |
"source": [
|
| 784 |
"import pysr\n",
|
| 785 |
-
"jl = pysr.julia_helpers.init_julia(
|
|
|
|
|
|
|
| 786 |
]
|
| 787 |
},
|
| 788 |
{
|
|
|
|
| 772 |
"the [Primes.jl](https://github.com/JuliaMath/Primes.jl) package.\n",
|
| 773 |
"\n",
|
| 774 |
"First, let's get the Julia backend\n",
|
| 775 |
+
"Here, we might choose to manually specify unlimited threads, `-O3`,\n",
|
| 776 |
+
"and `compile_modules=False`, although this will only propagate if Julia has not yet started:"
|
| 777 |
]
|
| 778 |
},
|
| 779 |
{
|
|
|
|
| 783 |
"outputs": [],
|
| 784 |
"source": [
|
| 785 |
"import pysr\n",
|
| 786 |
+
"jl = pysr.julia_helpers.init_julia(\n",
|
| 787 |
+
" julia_kwargs={\"threads\": \"auto\", \"optimize\": 2, \"compiled_modules\": False}\n",
|
| 788 |
+
")"
|
| 789 |
]
|
| 790 |
},
|
| 791 |
{
|