Skip to content

Commit

Permalink
Fix work around #906 (#96)
Browse files Browse the repository at this point in the history
- Work around IntelPython/numba-dpex#906 by moving bugged instruction patterns to `dpex.func` functions

- Fix tolerance value

- Implement strict convergence checking

---------

Co-authored-by: Olivier Grisel <[email protected]>
Co-authored-by: Julien Jerphanion <[email protected]>
  • Loading branch information
3 people authored Feb 28, 2023
1 parent e80ef78 commit 7b647cb
Show file tree
Hide file tree
Showing 16 changed files with 768 additions and 369 deletions.
1 change: 0 additions & 1 deletion docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,6 @@ ARG ONEAPI_CACHE_DIR=$TMPDIR/intel/cache
ARG ONEAPI_DOWNLOAD_DIR=$TMPDIR/intel/download
ARG ONEAPI_LOG_DIR=$TMPDIR/intel/log
ARG ONEAPI_COMPONENTS="intel.oneapi.lin.dpcpp-cpp-compiler:intel.oneapi.lin.tbb.devel:intel.oneapi.lin.mkl.devel"
ARG LLVM_SPIRV_INSTALL_DIR
RUN mkdir -p $ONEAPI_INSTALL_DIR $ONEAPI_CACHE_DIR $ONEAPI_DOWNLOAD_DIR $ONEAPI_LOG_DIR \
&& wget -P $ONEAPI_DOWNLOAD_DIR $ONEAPI_INSTALLER_URL/$ONEAPI_INSTALL_BINARY_NAME \
&& chmod +x $ONEAPI_DOWNLOAD_DIR/$ONEAPI_INSTALL_BINARY_NAME \
Expand Down
11 changes: 7 additions & 4 deletions sklearn_numba_dpex/common/_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,14 @@ def _plus_closure(x, y):
return _plus_closure


def _divide():
def _divide_closure(x, y):
return x / y
def _divide_by(divisor):
def _divide_by_fn():
def _divide_closure(x):
return x / divisor

return _divide_closure
return _divide_closure

return _divide_by_fn


def _check_max_work_group_size(
Expand Down
Loading

0 comments on commit 7b647cb

Please sign in to comment.