Skip to content

Commit

Permalink
No commit message
Browse files Browse the repository at this point in the history
  • Loading branch information
paulxshen committed Jan 23, 2025
1 parent 2ff647b commit ed5cd8d
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 54 deletions.
71 changes: 18 additions & 53 deletions Luminescent_AI_docs.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -258,19 +258,6 @@
"# Known issues"
]
},
{
"cell_type": "markdown",
"id": "99ef369e",
"metadata": {
"id": "99ef369e"
},
"source": [
"## Compilation lag\n",
"We release source code but not precompiled binaries. Each Python run starts a new Julia session that JIT compiles simulation code. This takes 4min for simulation and 8min for inverse design. The subsequent simulation itself may only take seconds (eg GPU simulations in this notebook).\n",
"\n",
"Building standalone binaries for Julia applications is nontrivial. Please request binaries from us if needed."
]
},
{
"cell_type": "markdown",
"id": "lPXTDMpriabQ",
Expand Down Expand Up @@ -347,43 +334,7 @@
},
"source": [
"## Backend\n",
"Install latest Julia. If on Windows, use [julialang.org](https://julialang.org). If on Linux, can do:"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "0e32e02d",
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "0e32e02d",
"outputId": "a7085fca-b0c6-43be-a135-523d4237f623"
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"2025-01-14 04:07:08 URL:https://storage.googleapis.com/julialang2/bin/linux/x64/1.11/julia-1.11.2-linux-x86_64.tar.gz [285843560/285843560] -> \"/tmp/julia.tar.gz\" [1]\n"
]
},
{
"data": {
"text/plain": []
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"%%shell\n",
"URL=\"https://julialang-s3.julialang.org/bin/linux/x64/1.11/julia-1.11.2-linux-x86_64.tar.gz\"\n",
"wget -nv $URL -O /tmp/julia.tar.gz # -nv means \"not verbose\"\n",
"tar -x -f /tmp/julia.tar.gz -C /usr/local --strip-components 1\n",
"rm /tmp/julia.tar.gz"
"Install Julia FDTD binaries "
]
},
{
Expand All @@ -393,7 +344,8 @@
"id": "3d5f8003"
},
"source": [
"Install FDTD (20min)"
"### Linux\n",
"Add last line to your shell profile to permanently add binary to your path"
]
},
{
Expand All @@ -419,7 +371,20 @@
],
"source": [
"%%shell\n",
"julia -e 'using Pkg; pkg\"add CUDA, https://github.com/paulxshen/Luminescent.jl;up\"' &> /dev/null"
"wget -nv \"https://github.com/paulxshen/Luminescent.jl/releases/download/v0.4/Luminescent.tar.gz.partaa\" -O Luminescent.tar.gz.partaa\n",
"wget -nv \"https://github.com/paulxshen/Luminescent.jl/releases/download/v0.4/Luminescent.tar.gz.partab\" -O Luminescent.tar.gz.partab\n",
"cat Luminescent.tar.gz.parta* >Luminescent.tar.gz\n",
"sudo tar xf Luminescent.tar.gz -C /usr/local \n",
"export PATH=$PATH:/usr/local/Luminescent/bin\n"
]
},
{
"cell_type": "markdown",
"id": "7cad983b",
"metadata": {},
"source": [
"### Windows\n",
"Binaries available upon request"
]
},
{
Expand Down Expand Up @@ -1270,7 +1235,7 @@
"setting up simulation...\n",
"Float16 selected. make sure your cpu or GPU supports it. otherwise will be emulated and very slow.\n",
"using Float16\n",
"λ = center_wavelength = 1.5\n",
"λ = wl = 1.5\n",
"saving mode solutions\n",
"saving mode solutions\n",
"(Ttrans, Tss) = (34.10859375, 12)\n",
Expand Down
4 changes: 3 additions & 1 deletion build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,7 @@ git clone https://[email protected]/paulxshen/Luminescent.jl
cd Luminescent.jl

julia "build/build.jl"
../Luminescent/bin/Luminescent
export PATH=~/LuminescentAI/bin:$PATH
tar czf /Luminescent.tar.gz LuminescentAI
tar czf Luminescent.tar.gz Luminescent
split -b 1.5G Luminescent.tar.gz "Luminescent.tar.gz.part"

0 comments on commit ed5cd8d

Please sign in to comment.