similar to: accelerating matrix multiply

Displaying 20 results from an estimated 700 matches similar to: "accelerating matrix multiply"

2017 Jan 11
2
accelerating matrix multiply
> Do you have R code (including set.seed(.) if relevant) to show on how to generate > the large square matrices you've mentioned in the beginning? So we get to some > reproducible benchmarks? Hi Martin, Here is the program I used. I only generate 2 random numbers and reuse them to make the benchmark run faster. Let me know if there is something I can do to help--alternate
2017 Jan 16
1
accelerating matrix multiply
Hi Tomas, Can you share the full code for your benchmark, compiler options, and performance results so that I can try to reproduce them? There are a lot of variables that can affect the results. Private email is fine if it is too much for the mailing list. I am measuring on Knight's Landing (KNL) that was released in November. KNL is not a co-processor so no offload is necessary. R executes
2017 Jan 10
0
accelerating matrix multiply
>>>>> Cohn, Robert S <robert.s.cohn at intel.com> >>>>> on Sat, 7 Jan 2017 16:41:42 +0000 writes: > I am using R to multiply some large (30k x 30k double) > matrices on a 64 core machine (xeon phi). I added some timers > to src/main/array.c to see where the time is going. All of the > time is being spent in the matprod function, most of that
2017 Jan 16
0
accelerating matrix multiply
Hi Robert, thanks for the report and your suggestions how to make the NaN checks faster. Based on my experiments it seems that the "break" in the loop actually can have positive impact on performance even in the common case when we don't have NaNs. With gcc on linux (corei7), where isnan is inlined, the "break" version uses a conditional jump while the
2005 Oct 12
1
Using matprod from array.c
Hi, I was wondering if I could use the matprod function from array.c in my own C routine. I tried the following as a test /* my_matprod.c */ # include <Rinternals.h> /* for REAL, SEXP etc */ # include <R_ext/Applic.h> /* array.c says need for dgemm */ /* following copied from array.c */ static void matprod(double *x, int nrx, int ncx, double *y, int nry, int ncy, double *z)
2017 Jan 09
0
accelerating matrix multiply
> From: "Cohn, Robert S" <robert.s.cohn at intel.com> > > I am using R to multiply some large (30k x 30k double) matrices on a > 64 core machine (xeon phi). I added some timers to > src/main/array.c to see where the time is going. All of the time is > being spent in the matprod function, most of that time is spent in > dgemm. 15 seconds is in matprod in
2011 Feb 20
2
Problem using F77_CALL(dgemm) in a package
Dear R-devel, I've written a numerical solver for SOCPs (second order cone programs) in R, and now I want to move most of the solver code into C for speed. I've written combined R/C packages before, but in this case I need to do matrix operations in my C code. As I have never done that before, I'm trying to write some simple examples to make sure I understand the basics. I am stuck
2003 Oct 14
3
NA %*% 0 == 0 (PR#4582)
Full_Name: J . R. M. Hosking Version: 1.8.0 OS: Windows 2000 Submission from: (NULL) (129.34.20.23) On R 1.8.0 (and on R 1.5.1), Windows binary: > NA %*% 0 [,1] [1,] 0 This is surprising. Is it a bug? Note that > 0 %*% NA [,1] [1,] NA > NA %*% 1 [,1] [1,] NA > NA * 0 [1] NA as expected.
2017 Aug 21
2
Control multi-threading in standard matrix product
Hi Tomas, Thanks for your answer. Indeed, I checked and my R-3.4.1 installed from the ubuntu repository use 'libopenblasp-r0.2.18.so' while my R-3.3.2 that I did compiled on my machine use 'libRblas.so' which explain the difference of behavior. I will use RhpcBLASctl to avoid issue when combining matrix product and other multi-threading package. Maybe this point regarding
2006 Feb 22
2
How can I see how %*% is implemented?
I would like to see how the matrix multiplication operator %*% is implemented (because I want to see which external Fortran/C routines are used). How can I do so? Best S??ren
2010 Aug 23
1
Speeding up matrix multiplies
I've looked at the code for matrix multiplies in R, and found that it can speeded up quite a bit, for multiplies that are really vector dot products, and for other multiplies in which the result matrix is small. Here's my test program: u <- seq(0,1,length=1000) v <- seq(0,2,length=1000) A2 <- matrix(2.1,2,1000) A5 <- matrix(2.1,5,1000) B3 <- matrix(3.2,1000,3) A4 <-
2006 Mar 09
0
When calling external C-function repeatedly I get different results; can't figure out why..
Dear all, I need to calculate tr(xyxy) fast for matrices x and y. Inspired by the R-source code, I've created the following functions (I am *new* to writing external C-functions, so feel free to laugh at my code - or, perhaps, suggest changes): #include <Rinternals.h> #include <R_ext/Applic.h> /* for dgemm */ static void matprod(double *x, int nrx, int ncx, double *y, int
2017 Aug 21
3
Control multi-threading in standard matrix product
Dear R Core Team, I wish to report what can be viewed as a bug or at least a strange behavior in R-3.4.1. I ask my question here (as recommended on https://www.r-project.org/bugs.html) since I am not member of the R's Bugzilla. When running 'R --vanilla' from the command line, the standard matrix product is by default based on BLAS and multi-threaded on all cores available on
2006 Mar 09
0
When calling external C-function repeatedly I get differentresults; can't figure out why..
Not an expert in programming either, but to me it seems like you've forgotten to initialize the variable "tr". It just picks up garbage from allocated memory previously initialized by other processes. Med venlig hilsen Frede Aakmann T?gersen > -----Oprindelig meddelelse----- > Fra: r-help-bounces at stat.math.ethz.ch > [mailto:r-help-bounces at stat.math.ethz.ch] P?
2009 Dec 14
2
[LLVMdev] clang and static functions
Hi, I am trying to compile a single module (dgemm.c) using clang and generate dgemm.ll. Command: clang -emit-llvm dgemm.c -S -o dgemm.ll Some of the functions are declared as static and clang ignores these functions: One of the functions is: static void innerloop(double a, const double* b, double* c, double beta) { *b = a*beta; return; } Is there any way to make clang generate llvm code
2010 Aug 23
1
Internal state indicating if a data object has NAs/no NAs/not sure (Was: Re: Speeding up matrix multiplies)
Hi, I'm just following your messages the overhead that the code for dealing with possible NA/NaN values brings. When I was setting up part of the matrixStats package, I've also though about this. I was thinking of having an additional logical argument 'hasNA'/'has.na' where you as a user can specify whether there is NA/NaN:s or not, allowing the code to avoid it or not.
2008 Apr 18
1
configure can't find dgemm in MKL10
Hi, I'm trying to follow the R-admin instructions for using MKL10 as the external BLAS compiling R-2.6.2 under Linux on a RH EL head node of a cluster. The configure process seems to have problems when it checks for dgemm in the BLAS. I'm using configure as: ./configure CC=icc F77=ifort --with-lapack="$MKL" --with-blas="$MKL" where $MKL is defined as in R-admin
2009 Dec 14
0
[LLVMdev] clang and static functions
Hi Arvind, you need to use it effectively : static int add(int a, int b) { return a+b; } int use() { return add(4,5); } ==> ; ModuleID = '<stdin>' target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32" target triple = "i386-pc-linux-gnu" define i32 @use()
2009 Dec 14
3
[LLVMdev] clang and static functions
Hi, Sorry for not being specific. I just wanted to know if there is any way at all to force clang to generate intermediate code for static functions when they are not being called anywhere inside the current module. Other compilers seem to generate intermediate code (lcc, for instance). Thanks for your reply..Olivier. Sincerely Arvind On Mon, Dec 14, 2009 at 1:10 PM, Olivier Meurant
2009 Dec 14
0
[LLVMdev] clang and static functions
Ah ok. Sorry. :) I think that argument "-femit-all-decls" will help you. Olivier. On Mon, Dec 14, 2009 at 9:18 PM, Arvind Sudarsanam < arvind.sudarsanam at aggiemail.usu.edu> wrote: > Hi, > > Sorry for not being specific. I just wanted to know if there is any > way at all to force clang to generate intermediate code for static > functions when they are not being