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

minor updates for kokkos in diffBragg #885

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
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
4 changes: 4 additions & 0 deletions simtbx/diffBragg/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@
import numpy as np
from simtbx_diffBragg_ext import *

import os
if os.environ.get("DIFFBRAGG_USE_CUDA") is not None and os.environ.get("DIFFBRAGG_USE_KOKKOS") is not None:
raise RuntimeError("Only set one of DIFFBRAGG_USE_CUDA, DIFFBRAGG_USE_KOKKOS.")

@bp.inject_into(ext.diffBragg)
class _():
def get_derivative_pixels(self, refine_id):
Expand Down
2 changes: 2 additions & 0 deletions simtbx/diffBragg/src/diffBragg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2114,6 +2114,8 @@ void diffBragg::add_diffBragg_spots(const af::shared<size_t>& panels_fasts_slows
printf("DIFFBRAGG isotropic Ncells=%d\n", isotropic_ncells);
if(use_cuda || getenv("DIFFBRAGG_USE_CUDA")!= NULL)
printf("TIME TO RUN DIFFBRAGG -GPU- (%llu iterations): %3.10f ms \n",n_total_iter, time);
else if(getenv("DIFFBRAGG_USE_KOKKOS")!= NULL)
printf("TIME TO RUN DIFFBRAGG -KOKKOS- (%llu iterations): %3.10f ms \n",n_total_iter, time);
else
printf("TIME TO RUN DIFFBRAGG -CPU- (%llu iterations): %3.10f ms \n",n_total_iter, time);
}
Expand Down