Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix pycuda templates to only load pycuda engines #538

Merged
merged 2 commits into from
Mar 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion templates/accelerate/ptypy_i13_AuStar_farfield_pycuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ptypy.core import Ptycho
from ptypy import utils as u
import ptypy
ptypy.load_gpu_engines(arch="cuda")
ptypy.load_gpu_engines(arch="pycuda")

import tempfile
tmpdir = tempfile.gettempdir()
Expand Down
2 changes: 1 addition & 1 deletion templates/accelerate/ptypy_i13_AuStar_nearfield_pycuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ptypy.core import Ptycho
from ptypy import utils as u
import ptypy
ptypy.load_gpu_engines(arch="cuda")
ptypy.load_gpu_engines(arch="pycuda")

import tempfile
tmpdir = tempfile.gettempdir()
Expand Down
2 changes: 1 addition & 1 deletion templates/accelerate/ptypy_id22ni_AuStar_focused_pycuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ptypy.core import Ptycho
from ptypy import utils as u
import ptypy
ptypy.load_gpu_engines(arch="cuda")
ptypy.load_gpu_engines(arch="pycuda")

import numpy as np
import tempfile
Expand Down
2 changes: 1 addition & 1 deletion templates/accelerate/ptypy_laser_logo_focused_pycuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from ptypy import utils as u
import ptypy.simulations as sim
import ptypy
ptypy.load_gpu_engines(arch="cuda")
ptypy.load_gpu_engines(arch="pycuda")

import pathlib
import numpy as np
Expand Down
2 changes: 1 addition & 1 deletion templates/accelerate/ptypy_minimal_prep_and_run_pycuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ptypy.core import Ptycho
from ptypy import utils as u
import ptypy
ptypy.load_gpu_engines(arch="cuda")
ptypy.load_gpu_engines(arch="pycuda")

import tempfile
tmpdir = tempfile.gettempdir()
Expand Down
2 changes: 1 addition & 1 deletion templates/engines/pycuda/moonflower_DM_ML_pycuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ptypy.core import Ptycho
from ptypy import utils as u
import ptypy
ptypy.load_gpu_engines(arch="cuda")
ptypy.load_gpu_engines(arch="pycuda")

import tempfile
tmpdir = tempfile.gettempdir()
Expand Down
2 changes: 1 addition & 1 deletion templates/engines/pycuda/moonflower_DM_pycuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ptypy.core import Ptycho
from ptypy import utils as u
import ptypy
ptypy.load_gpu_engines(arch="cuda")
ptypy.load_gpu_engines(arch="pycuda")

import tempfile
tmpdir = tempfile.gettempdir()
Expand Down
2 changes: 1 addition & 1 deletion templates/engines/pycuda/moonflower_DM_pycuda_nostream.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ptypy.core import Ptycho
from ptypy import utils as u
import ptypy
ptypy.load_gpu_engines(arch="cuda")
ptypy.load_gpu_engines(arch="pycuda")

import tempfile
tmpdir = tempfile.gettempdir()
Expand Down
2 changes: 1 addition & 1 deletion templates/engines/pycuda/moonflower_EPIE_ML_pycuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ptypy.core import Ptycho
from ptypy import utils as u
import ptypy
ptypy.load_gpu_engines(arch="cuda")
ptypy.load_gpu_engines(arch="pycuda")

import tempfile
tmpdir = tempfile.gettempdir()
Expand Down
2 changes: 1 addition & 1 deletion templates/engines/pycuda/moonflower_EPIE_pycuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ptypy.core import Ptycho
from ptypy import utils as u
import ptypy
ptypy.load_gpu_engines(arch="cuda")
ptypy.load_gpu_engines(arch="pycuda")

import tempfile
tmpdir = tempfile.gettempdir()
Expand Down
2 changes: 1 addition & 1 deletion templates/engines/pycuda/moonflower_ML_ML_pycuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from ptypy.core import Ptycho
from ptypy import utils as u
import ptypy
ptypy.load_gpu_engines(arch="cuda")
ptypy.load_gpu_engines(arch="pycuda")

import tempfile
tmpdir = tempfile.gettempdir()
Expand Down
2 changes: 1 addition & 1 deletion templates/engines/pycuda/moonflower_ML_pycuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from ptypy.core import Ptycho
from ptypy import utils as u
import ptypy
ptypy.load_gpu_engines(arch="cuda")
ptypy.load_gpu_engines(arch="pycuda")

import tempfile
tmpdir = tempfile.gettempdir()
Expand Down
2 changes: 1 addition & 1 deletion templates/engines/pycuda/moonflower_RAAR_ML_pycuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ptypy.core import Ptycho
from ptypy import utils as u
import ptypy
ptypy.load_gpu_engines(arch="cuda")
ptypy.load_gpu_engines(arch="pycuda")

import tempfile
tmpdir = tempfile.gettempdir()
Expand Down
2 changes: 1 addition & 1 deletion templates/engines/pycuda/moonflower_RAAR_pycuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ptypy.core import Ptycho
from ptypy import utils as u
import ptypy
ptypy.load_gpu_engines(arch="cuda")
ptypy.load_gpu_engines(arch="pycuda")

import tempfile
tmpdir = tempfile.gettempdir()
Expand Down
2 changes: 1 addition & 1 deletion templates/engines/pycuda/moonflower_SDR_pycuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
from ptypy.core import Ptycho
from ptypy import utils as u
import ptypy
ptypy.load_gpu_engines(arch="cuda")
ptypy.load_gpu_engines(arch="pycuda")

import tempfile
tmpdir = tempfile.gettempdir()
Expand Down
2 changes: 1 addition & 1 deletion templates/live_processing/moonflower_DM_delayed_pycuda.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from ptypy.core import Ptycho
from ptypy import utils as u
import ptypy
ptypy.load_gpu_engines(arch="cuda")
ptypy.load_gpu_engines(arch="pycuda")

import tempfile
tmpdir = tempfile.gettempdir()
Expand Down
62 changes: 11 additions & 51 deletions templates/notebooks/moonflower_dm_pycuda.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "python"
}
},
"metadata": {},
"outputs": [],
"source": [
"import ptypy\n",
Expand All @@ -27,25 +23,17 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "python"
}
},
"metadata": {},
"outputs": [],
"source": [
"# Import pycuda engines (DM, RAAR)\n",
"ptypy.load_gpu_engines(\"cuda\")"
"ptypy.load_gpu_engines(\"pycuda\")"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "python"
}
},
"metadata": {},
"outputs": [],
"source": [
"# create parameter tree\n",
Expand All @@ -55,11 +43,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "python"
}
},
"metadata": {},
"outputs": [],
"source": [
"# set verbose level to interactive\n",
Expand All @@ -69,11 +53,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "python"
}
},
"metadata": {},
"outputs": [],
"source": [
"# Nr. of frames in a block\n",
Expand All @@ -83,11 +63,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "python"
}
},
"metadata": {},
"outputs": [],
"source": [
"# set home path and io settings (no files saved)\n",
Expand All @@ -101,11 +77,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "python"
}
},
"metadata": {},
"outputs": [],
"source": [
"# max 200 frames (128x128px) of diffraction data\n",
Expand All @@ -125,11 +97,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "python"
}
},
"metadata": {},
"outputs": [],
"source": [
"# difference map reconstrucion engine\n",
Expand All @@ -144,11 +112,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "python"
}
},
"metadata": {},
"outputs": [],
"source": [
"# prepare and run\n",
Expand All @@ -165,11 +129,7 @@
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"vscode": {
"languageId": "python"
}
},
"metadata": {},
"outputs": [],
"source": [
"import ptypy.utils.plot_client as pc\n",
Expand Down
2 changes: 1 addition & 1 deletion templates/notebooks/moonflower_epie_pycuda.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
"outputs": [],
"source": [
"# Import pycuda engines (DM, RAAR)\n",
"ptypy.load_gpu_engines(\"cuda\")"
"ptypy.load_gpu_engines(\"pycuda\")"
]
},
{
Expand Down
Loading