Skip to content
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
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
24 changes: 10 additions & 14 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,12 +1,11 @@
Package: RcppBandicoot
Title: 'Rcpp' Integration for the `Bandicoot` Header-Only C++ GPU Accelerated Linear Algebra Library
Version: 0.1.11.1.9000
Authors@R:
c(
person("James Joseph", "Balamuta", email = "balamut2@illinois.edu",
role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0003-2826-8458"))
)
Authors@R: c(person("James Joseph", "Balamuta", email = "balamut2@illinois.edu",
role = c("aut", "cre", "cph"),
comment = c(ORCID = "0000-0003-2826-8458")),
person("Dirk", "Eddelbuettel", role = c("aut"), email = "edd@debian.org",
comment = c(ORCID = "0000-0001-6419-907X")))
Description: 'Bandicoot' is a templated C++ GPU Linear Algebra library
(by the 'Armadillo' team) that provides a simple set of abstractions for writing
high performant code for graphics processing units.
Expand All @@ -15,15 +14,12 @@ Description: 'Bandicoot' is a templated C++ GPU Linear Algebra library
Note that the 'Bandicoot' library is licensed under Apache License version 2.0 and
'RcppBandicoot' (the 'Rcpp' bindings/bridge to 'Bandicoot') is licensed under
the GNU GPL version 2 or later. Note that 'Bandicoot' requires a compiler that
supports 'C++14' and 'OpenCL' (>= 1.2) or 'CUDA' (>= 9.8).
supports 'OpenCL' (>= 1.2) or 'CUDA' (>= 9.8).
License: GPL (>= 2)
Depends:
R (>= 4.4)
LinkingTo:
Rcpp (>= 1.1.0)
Imports:
Rcpp (>= 1.1.0)
SystemRequirements: C++14, OpenCL (>= 1.2) or CUDA (>= 9.8), GPU device with appropriate drivers. For OpenCL: CLBlast (recommended) or clBLAS for BLAS operations.
Depends: R (>= 4.4)
LinkingTo: Rcpp (>= 1.1.0)
Imports: Rcpp (>= 1.1.0)
SystemRequirements: OpenCL (>= 1.2) or CUDA (>= 9.8), GPU device with appropriate drivers. For OpenCL: CLBlast (recommended) or clBLAS for BLAS operations.
Comment thread
eddelbuettel marked this conversation as resolved.
Encoding: UTF-8
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.3.3
4 changes: 4 additions & 0 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

gpu_initialize <- function(type = "opencl", print_info = TRUE) {
invisible(.Call(`_RcppBandicoot_gpu_initialize`, type, print_info))
}
Comment thread
eddelbuettel marked this conversation as resolved.
Comment thread
eddelbuettel marked this conversation as resolved.

#' Get Bandicoot version
#'
#' Prints the current version of the Bandicoot library.
Expand Down
9 changes: 2 additions & 7 deletions R/rcppbandicoot-package.R
Original file line number Diff line number Diff line change
Expand Up @@ -8,11 +8,6 @@
NULL

.onLoad <- function(libname, pkgname) {
# Set the kernel path for Bandicoot OpenCL kernels
kernel_path <- system.file("include/bandicoot_bits/opencl/kernels",
package = "RcppBandicoot")

if (nzchar(kernel_path)) {
Sys.setenv(COOT_CL_KERNEL_PATH = kernel_path)
}
## this function is now empty as the kernel path is a _compile-time_
## and not run-time issue
}
25 changes: 19 additions & 6 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ ac_includes_default="\
ac_header_cxx_list=
ac_subst_vars='LTLIBOBJS
LIBOBJS
BANDICOOT_KERNELS_DIR
OPENCL_TARGET_VERSION
SDKPATH
CUDA_HOME
Expand Down Expand Up @@ -5230,12 +5231,12 @@ fi
## Determine Default Backend
## =============================================================================

if test "x${HAVE_OPENCL}" = x1; then
DEFAULT_BACKEND="CL_BACKEND"
BANDICOOT_CXXFLAGS="${BANDICOOT_CXXFLAGS} -DCOOT_DEFAULT_BACKEND=CL_BACKEND"
elif test "x${HAVE_CUDA}" = x1; then
if test "x${HAVE_CUDA}" = x1; then
DEFAULT_BACKEND="CUDA_BACKEND"
BANDICOOT_CXXFLAGS="${BANDICOOT_CXXFLAGS} -DCOOT_DEFAULT_BACKEND=CUDA_BACKEND"
elif test "x${HAVE_OPENCL}" = x1; then
DEFAULT_BACKEND="CL_BACKEND"
BANDICOOT_CXXFLAGS="${BANDICOOT_CXXFLAGS} -DCOOT_DEFAULT_BACKEND=CL_BACKEND"
else
as_fn_error $? "
================================================================================
Expand All @@ -5258,14 +5259,21 @@ After installation, ensure GPU drivers are properly installed and configured.
" "$LINENO" 5
fi

## Installation directory
## Note that we end on 'ks', not 'kernels', to shorten the path.
## Note also that we ensure a final trailing '/'
BANDICOOT_KERNELS_DIR=$(${R_HOME}/bin/Rscript -e 'cat(paste(head(.libPaths(),1), "RcppBandicoot", "include", "bandicoot_bits", "ks", "", sep="/"))')



{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: " >&5
printf "%s\n" "$as_me: " >&6;}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: GPU Backend Configuration Summary:" >&5
printf "%s\n" "$as_me: GPU Backend Configuration Summary:" >&6;}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Platform: ${RSysinfoName}" >&5
printf "%s\n" "$as_me: Platform: ${RSysinfoName}" >&6;}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: C++ Standard: C++14" >&5
printf "%s\n" "$as_me: C++ Standard: C++14" >&6;}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: C++ Standard: C++14 or later" >&5
printf "%s\n" "$as_me: C++ Standard: C++14 or later" >&6;}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: OpenCL: ${HAVE_OPENCL}" >&5
printf "%s\n" "$as_me: OpenCL: ${HAVE_OPENCL}" >&6;}
if test "x${HAVE_OPENCL}" = x1; then
Expand All @@ -5280,6 +5288,8 @@ fi
printf "%s\n" "$as_me: CUDA: ${HAVE_CUDA}" >&6;}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Default: ${DEFAULT_BACKEND}" >&5
printf "%s\n" "$as_me: Default: ${DEFAULT_BACKEND}" >&6;}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: Kernels: ${BANDICOOT_KERNELS_DIR}" >&5
printf "%s\n" "$as_me: Kernels: ${BANDICOOT_KERNELS_DIR}" >&6;}
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: " >&5
printf "%s\n" "$as_me: " >&6;}

Expand Down Expand Up @@ -5365,6 +5375,9 @@ BANDICOOT_LIBS="${BANDICOOT_LIBS} ${LAPACK_BLAS_LIBS}"
## OpenCL target version


## Bandicoot kernels


ac_config_files="$ac_config_files src/Makevars R/flags.R"

cat >confcache <<\_ACEOF
Expand Down
21 changes: 16 additions & 5 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -359,12 +359,12 @@ fi
## Determine Default Backend
## =============================================================================

if test "x${HAVE_OPENCL}" = x1; then
DEFAULT_BACKEND="CL_BACKEND"
BANDICOOT_CXXFLAGS="${BANDICOOT_CXXFLAGS} -DCOOT_DEFAULT_BACKEND=CL_BACKEND"
elif test "x${HAVE_CUDA}" = x1; then
if test "x${HAVE_CUDA}" = x1; then
DEFAULT_BACKEND="CUDA_BACKEND"
BANDICOOT_CXXFLAGS="${BANDICOOT_CXXFLAGS} -DCOOT_DEFAULT_BACKEND=CUDA_BACKEND"
elif test "x${HAVE_OPENCL}" = x1; then
DEFAULT_BACKEND="CL_BACKEND"
BANDICOOT_CXXFLAGS="${BANDICOOT_CXXFLAGS} -DCOOT_DEFAULT_BACKEND=CL_BACKEND"
else
AC_MSG_ERROR([
================================================================================
Expand All @@ -387,10 +387,17 @@ After installation, ensure GPU drivers are properly installed and configured.
])
fi

## Installation directory
## Note that we end on 'ks', not 'kernels', to shorten the path.
## Note also that we ensure a final trailing '/'
BANDICOOT_KERNELS_DIR=$(${R_HOME}/bin/Rscript -e 'cat(paste(head(.libPaths(),1), "RcppBandicoot", "include", "bandicoot_bits", "ks", "", sep="/"))')



AC_MSG_NOTICE([])
AC_MSG_NOTICE([GPU Backend Configuration Summary:])
AC_MSG_NOTICE([ Platform: ${RSysinfoName}])
AC_MSG_NOTICE([ C++ Standard: C++14])
AC_MSG_NOTICE([ C++ Standard: C++14 or later])
AC_MSG_NOTICE([ OpenCL: ${HAVE_OPENCL}])
if test "x${HAVE_OPENCL}" = x1; then
AC_MSG_NOTICE([ CLBlast: ${HAVE_CLBLAST}])
Expand All @@ -399,6 +406,7 @@ if test "x${HAVE_OPENCL}" = x1; then
fi
AC_MSG_NOTICE([ CUDA: ${HAVE_CUDA}])
AC_MSG_NOTICE([ Default: ${DEFAULT_BACKEND}])
AC_MSG_NOTICE([ Kernels: ${BANDICOOT_KERNELS_DIR}])
AC_MSG_NOTICE([])

## =============================================================================
Expand Down Expand Up @@ -478,5 +486,8 @@ AC_SUBST([SDKPATH])
## OpenCL target version
AC_SUBST([OPENCL_TARGET_VERSION])

## Bandicoot kernels
AC_SUBST([BANDICOOT_KERNELS_DIR])

AC_CONFIG_FILES([src/Makevars R/flags.R])
AC_OUTPUT
Loading