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: change cupy._util.memoize to cupy.memoize #6

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
2 changes: 1 addition & 1 deletion FasterRCNNDetection/model/roi_module.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
Stream = namedtuple('Stream', ['ptr'])


@cupy.util.memoize(for_each_device=True)
@cupy.memoize(for_each_device=True)
def load_kernel(kernel_name, code, **kwargs):
cp.cuda.runtime.free(0)
code = Template(code).substitute(**kwargs)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
import warnings
warnings.warn('''
the python code for non_maximum_suppression is about 2x slow
It is strongly recommended to build cython code:
It is strongly recommended to build cython code:
`cd model/utils/nms/; python3 build.py build_ext --inplace''')
from ._nms_gpu_post_py import _nms_gpu_post


@cp.util.memoize(for_each_device=True)
@cp.memoize(for_each_device=True)
def _load_kernel(kernel_name, code, options=()):
cp.cuda.runtime.free(0)
assert isinstance(options, tuple)
Expand Down