profile
viewpoint
If you are wondering where the data of this site comes from, please visit https://api.github.com/users/reikdas/events. GitMemory does not store any data, but only uses NGINX to cache data for a period of time. The idea behind GitMemory is simply to give users a better reading experience.
Pratyush Das reikdas Purdue University West Lafayette, Indiana CS PhD student

diana-hep/spark-root 27

Apache Spark Data Source for ROOT File Format

diana-hep/root4j 7

A fork of http://java.freehep.org/freehep-rootio/ with hooks for Spark DataFrames

reikdas/Curated_Resources 1

A list of resources which I have gone through and found appropriate.

reikdas/AlgoLab 0

Codes for my Algorithm Lab

reikdas/awesome-courses 0

:books: List of awesome university courses for learning Computer Science!

reikdas/awkward-1.0 0

Manipulate JSON-like data with NumPy-like idioms.

startedrhysd/vim-grammarous

started time in 6 hours

push eventreikdas/CV

Pratyush Das

commit sha 6fdbdec775762bee333928c61158cd626e57c441

Update

view details

push time in 6 hours

startedTiarkRompf/lms-clean

started time in 22 days

PR opened wsmoses/Enzyme

[Draft] Calculate adjoint of cblas_dgemm

(Draft placeholder for GSoC report)

+1360 -167

0 comment

11 changed files

pr created time in a month

push eventwsmoses/Enzyme

Pratyush Das

commit sha 80f010942eca46212fe2f3eac9d866637e599f92

x

view details

push time in 2 months

push eventwsmoses/Enzyme

Pratyush Das

commit sha 66e42f85b90ea2aca8d0888dfacae0a6a154d93a

Handle inactivity of A and B

view details

Pratyush Das

commit sha f24e8c6b4fc378bc0d8665bec2f9ef6c95ce0f19

Unable to recognize overwritten arg

view details

push time in 2 months

push eventwsmoses/Enzyme

Pratyush Das

commit sha 521bf0708fd04cc66bf8d3adfb51f6c60a030fde

Handle trans + colmajor

view details

push time in 2 months

push eventwsmoses/Enzyme

William S. Moses

commit sha d88ecdab5c95c5469715ae40bd903517dd3ca25e

Add OpenMP type analysis

view details

William S. Moses

commit sha b86a06c6d79ccde136cdb3093bfb88a079bb2ffd

Speed up analysis

view details

William S. Moses

commit sha b84d5751217fa475fb3b1936d3246f2ebfe4077e

Fix Openmp inner loop cache

view details

William S. Moses

commit sha ef5a445766a6f34c2e8b9cb39878e2926b4341b9

Fix tests

view details

Pratyush Das

commit sha a6b827e5c887def80dc8db82dd7d0eb7b170a304

Basic implementation

view details

Pratyush Das

commit sha 2f44d8727a11670be9649238be622c89c8ababdc

Handle transpose of input matrices

view details

Pratyush Das

commit sha d06d61d83c0b0e4afa9ddd152e86d62ce1a30758

ConjTrans and Trans should be same

view details

Pratyush Das

commit sha 3b85dfbe5b6c58d8a95a5749b5827022a85e897d

ColumnMajor order works

view details

push time in 2 months

push eventwsmoses/Enzyme

Pratyush Das

commit sha b50f837fedbe0c1ec72a9864f9c2f8c42c918ec6

Handle transpose of input matrices

view details

push time in 2 months

push eventwsmoses/Enzyme

William Moses

commit sha 1143574dc166ce548b1d5a639dc18977da65e10a

Fix invert phi reinsertion (#261)

view details

William Moses

commit sha 40b7077e4cc5fc46c892c0ed551456eee74aded2

Handle global function array (#263) * Handle global function array * Fix format

view details

William S. Moses

commit sha e27d11df019bf880e776822511273f5f1bdd95bb

Fix double free error

view details

William S. Moses

commit sha 3fbb97b23016d34c6e9f8031d3f995e5edea617a

Handle openmp critical section

view details

Pratyush Das

commit sha 72eb0403b14a9d83a3ad93fce7886f7fb4826fe0

Basic implementation

view details

push time in 2 months

create barnchwsmoses/Enzyme

branch : reikdas/dgemm

created branch time in 2 months

delete branch wsmoses/Enzyme

delete branch : reikdas/ddot-adjoint

delete time in 2 months

push eventwsmoses/Enzyme

Pratyush Das

commit sha ff17a4e77987b0446cc6043e70931c7b514ef4f7

cblas_ddot/cblas_sdot -> cblas_daxpy/cblas_saxpy Derivative of cblas_ddot can be calculated with calls to cblas_daxpy. Similarly for cblas_sdot.

view details

push time in 2 months

push eventwsmoses/Enzyme

William Moses

commit sha 0d4c426870da0132eb4428a7144320685e150c27

Fix OpenMP & Tape Error (#254) * Fix tape erasure bug * Fix opm leak

view details

William Moses

commit sha 7d16f407af1da706e6de2f342208c2671d23c892

Add inverted load test (#252)

view details

William Moses

commit sha 494a7a454add9436db5f3bda4e9da709551113ec

[TypeAnalysis] Fix subtract of pointer (#256)

view details

Pratyush Das

commit sha b4d91aa144a91a53bef5155c00341f5ff51e4f11

cblas_ddot/cblas_sdot -> cblas_daxpy/cblas_saxpy Derivative of cblas_ddot can be calculated with calls to cblas_daxpy. Similarly for cblas_sdot.

view details

push time in 2 months

Pull request review commentwsmoses/Enzyme

Use calls to cblas_daxpy to calculate the derivative of functions with cblas_ddot

+;RUN: %opt < %s %loadEnzyme -enzyme -mem2reg -instsimplify -simplifycfg -S | FileCheck %s++;#include <cblas.h>+;+;extern double __enzyme_autodiff(double*, double*, double*);+;+;double g(double *restrict n) {+;    double m[3] = {1, 2, 3};+;	 double x = cblas_ddot(3, m, 1, n, 1);+;    double y = x*x;

Would this be an appropriate example?

float g(float *restrict m, float *restrict n) {
  int stride = 3;
  float x = cblas_sdot(3, m, 2, n, stride);
  float y = x * x;
  return y;
}

int main() {
  float m[6] = {1, 2, 3, 101, 102, 103};
  float m1[6] = {0, 0, 0, 0, 0, 0};
  float n[9] = {4, 5, 6, 104, 105, 106, 7, 8, 9};
  float n1[9] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
  __enzyme_autodiff((void*)g, m, m1, n, n1);
}
reikdas

comment created time in 2 months

PullRequestReviewEvent

push eventwsmoses/Enzyme

Pratyush Das

commit sha 03cc599568625ef2930dd6168f8c324aed1cd897

Fix bug + cleanup

view details

push time in 2 months

Pull request review commentwsmoses/Enzyme

Use calls to cblas_daxpy to calculate the derivative of functions with cblas_ddot

 Function *getOrInsertDifferentialFloatMemcpy(Module &M, PointerType *T,   return F; } +Function *getOrInsertMemcpyStrided(Module &M, PointerType *T, unsigned dstalign,+                                   unsigned srcalign, Value *stride) {+  Type *elementType = T->getElementType();+  assert(elementType->isFloatingPointTy());+  std::string name = "__enzyme_memcpy_" + tofltstr(elementType) + "da" ++                     std::to_string(dstalign) + "sa" ++                     std::to_string(srcalign) + "stride" ++                     std::to_string(cast<ConstantInt>(stride)->getSExtValue());

Could you please help me figure out an alternate way to make the name of the function unique for that particular stride number?

reikdas

comment created time in 2 months

PullRequestReviewEvent

push eventwsmoses/Enzyme

Pratyush Das

commit sha d8739b75aa45d4e0f4f6bea73e4da303f5b98040

Fix possible bugs

view details

push time in 2 months

push eventwsmoses/Enzyme

William Moses

commit sha 7e49000dd4af41f3fe6ca65f822cf84e493d3309

[OpenMP] fix openmp (#243)

view details

William Moses

commit sha 534c38f7b036fe7df502df806ad432c835a5d322

Primitive masked intrinsic support (#249)

view details

William Moses

commit sha d6a5b1a52193223dd40371b54723e4f977db6dd2

Don't erase custom call for primal (#247) * Don't erase custom call for primal * Error on token type storage

view details

William Moses

commit sha e0a2944c412d1e97e070a382292a082aee04500f

Speed up invert original map (#250)

view details

Pratyush Das

commit sha 9c82ab0d64b357e393272106828230cc503e1c33

cblas_ddot/cblas_sdot -> cblas_daxpy/cblas_saxpy Derivative of cblas_ddot can be calculated with calls to cblas_daxpy. Similarly for cblas_sdot.

view details

push time in 2 months

push eventwsmoses/Enzyme

Pratyush Das

commit sha 3f5a23307ffb3236ce77c33bd56a3fb9e74c4874

Clean up conditionals

view details

Pratyush Das

commit sha bdf9430459c90297b3be3fa67242cd5ae21d8388

Strided memcpy

view details

push time in 2 months

Pull request review commentwsmoses/Enzyme

Use calls to cblas_daxpy to calculate the derivative of functions with cblas_ddot

 class AdjointGenerator       return;     } +    if (funcName == "cblas_ddot" && called->isDeclaration()) {+      Type *castvals[2] = {call.getArgOperand(1)->getType(),+                           call.getArgOperand(3)->getType()};+      auto *cachetype = StructType::get(call.getContext(), ArrayRef(castvals));+      Value *undefinit = UndefValue::get(cachetype);+      Value *cacheval;+      auto in_arg = call.getCalledFunction()->arg_begin();+      in_arg++;+      Argument *xfuncarg = in_arg;+      in_arg++;+      in_arg++;+      Argument *yfuncarg = in_arg;+      bool xoverwrite = uncacheable_args.find(xfuncarg)->second;+      bool yoverwrite = uncacheable_args.find(yfuncarg)->second;+      if ((Mode == DerivativeMode::ReverseModeCombined ||+           Mode == DerivativeMode::ReverseModePrimal) &&+          ((!gutils->isConstantValue(call.getArgOperand(3)) && xoverwrite) ||+           (!gutils->isConstantValue(call.getArgOperand(1)) && yoverwrite))) {+        auto size =+            ConstantExpr::getSizeOf(Type::getDoubleTy(call.getContext()));+        BuilderZ.SetInsertPoint(gutils->getNewFromOriginal(&call));+        auto *newcall = dyn_cast<CallInst>(gutils->getNewFromOriginal(&call));+        Value *arg1, *arg2;+        if (!gutils->isConstantValue(call.getArgOperand(3)) && xoverwrite) {+          auto malins1 = CallInst::CreateMalloc(+              gutils->getNewFromOriginal(&call), size->getType(),+              Type::getDoubleTy(call.getContext()), size, call.getArgOperand(0),+              nullptr, "");+          arg1 =+              BuilderZ.CreateBitCast(malins1, call.getArgOperand(1)->getType());+          auto memcpy_size1 =+              (int)(call.getFunction()+                        ->getParent()+                        ->getDataLayout()+                        .getTypeAllocSize(+                            newcall->getArgOperand(1)->getType())) *+              dyn_cast<ConstantInt>(call.getArgOperand(0))->getSExtValue();+#if LLVM_VERSION_MAJOR >= 10+          BuilderZ.CreateMemCpy(arg1, MaybeAlign(), newcall->getArgOperand(1),

Just to clarify,

For a strided implementation where we do something like -

g(double *m, double* m1, double *n, double *n1) { // Where m1, n1 are shadow args
  cblas_ddot(3, m, 2, n, 3); // 2 is the stride for m. 3 is the stride for n.
  ....
}
  
int caller() {
  double m[6] = {1, 2, 3, 4, 5, 6};
  double m1[6] = {0, 0, 0, 0, 0, 0};
  double n[9] = {1, 2, 3, 4, 5, 6, 7, 8, 9};
  double n1[9] = {0, 0, 0, 0, 0, 0, 0, 0, 0};
  g(m, m1, n, n1);

If cblas_ddot's source code is available, we store the derivatives wrt m in m1[0], m1[2], m1[4]. And the derivatives wrt n in n1[0], n1[3], n1[6].

If I understand correctly, in the strided memcpy implementation that you suggest, we would be storing the derivatives wrt m in m1[0], m1[1], m1[2]. And the derivatives wrt n in n1[0], n1[1], n1[2]. Is that okay?

reikdas

comment created time in 2 months

PullRequestReviewEvent

push eventwsmoses/Enzyme

William Moses

commit sha 514f044dd4d7d93d0f27adda444ca0ed53f462d6

Only set debug info if unwrapping to the same function & Fix nondeterministic cache (#246)

view details

Pratyush Das

commit sha 37ab98eec1930b3209355ef46bdb52a0be1227a2

cblas_ddot/cblas_sdot -> cblas_daxpy/cblas_saxpy Derivative of cblas_ddot can be calculated with calls to cblas_daxpy. Similarly for cblas_sdot.

view details

push time in 2 months

push eventwsmoses/Enzyme

Pratyush Das

commit sha 68b67513ca44acb81de153757870e8f9fbffbbec

Handle varying strides

view details

push time in 2 months

push eventwsmoses/Enzyme

Pratyush Das

commit sha 83168e64a1df58d7f325158d49b3df6dbef46447

Fix tests

view details

push time in 2 months

push eventwsmoses/Enzyme

Pratyush Das

commit sha fd05e97dc5c87762238dfed7bec71cd9894d8d55

DRY for ddot and sdot

view details

Pratyush Das

commit sha 5763b6a40b0c727855e18044f12bde445de4cc05

Move blas tests to different folder

view details

push time in 2 months

push eventwsmoses/Enzyme

Pratyush Das

commit sha 50ea0d20208ca75f4d21fbbfbdd3664fd3b2ce21

cblas_saxpy calls as derivative of cblas_sdot

view details

push time in 2 months