EnzymeAD / EnzymeAD/Enzyme-JAX

Subtract reduction raising

Open
#560 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
MLIR
Stars
131
Forks
53
Avg merge
1d 10h
Merged PRs (30d)
193

Description

```
func.func private @"##call__Z31gpu__compute_w_from_continuity_16CompilerMetadataI16OffsetStaticSizeI14__5_51___5_26_E12DynamicCheckvv7NDRangeILi2E10StaticSizeI6_4__2_ES4_I8_16__16_E5TupleI5Int64S8_E13KernelOffsetsIS9_EEE10NamedTupleI12__u___v___w_S7_I11OffsetArrayI7Float64Li3E13CuTracedArrayISG_Li3ELi1E12_59__34__24_EESF_ISG_Li3ESH_ISG_Li3ELi1E12_59__35__24_EESF_ISG_Li3ESH_ISG_Li3ELi1E12_59__34__25_EEEE21LatitudeLongitudeGridISG_8Periodic7BoundedSS_28StaticVerticalDiscretizationISF_ISG_Li1ESH_ISG_Li1ELi1E5_25__EESF_ISG_Li1ESH_ISG_Li1ELi1E5_24__EESV_SX_ESG_SG_SF_ISG_Li1E12StepRangeLenISG_14TwicePrecisionISG_ES11_S8_EES13_SG_SG_S13_S13_SF_ISG_Li1ESH_ISG_Li1ELi1E5_34__EES15_S15_S15_SG_SG_vS8_E#589$par170"(%arg0: memref<24x34x59xf64, 1>, %arg1: memref<24x35x59xf64, 1>, %arg2: memref<25x34x59xf64, 1>, %arg3: memref<24xf64, 1>, %arg4: memref<34xf64, 1>, %arg5: memref<34xf64, 1>) {
%cst = arith.constant 0.000000e+00 : f64
%cst_0 = arith.constant 889559.41315646993 : f64
affine.parallel (%arg6, %arg7) = (0, 0) to (32, 57) {
affine.store %cst, %arg2[7, %arg6 + 1, %arg7 + 1] : memref<25x34x59xf64, 1>
%0 = affine.load %arg2[7, %arg6 + 1, %arg7 + 1] : memref<25x34x59xf64, 1>
%1 = affine.for %arg8 = 0 to 10 iter_args(%arg9 = %0) -> (f64) {
%2 = affine.load %arg3[%arg8 + 7] {alignment = 8 : i64, ordering = 0 : i64, tbaa = [#tbaa_tag]} : memref<24xf64, 1>
%3 = arith.mulf %2, %cst_0 {fastmathFlags = #llvm.fastmath} : f64
%4 = affine.load %arg0[%arg8 + 7, %arg6 + 1, %arg7 + 2] : memref<24x34x59xf64, 1>
%5 = arith.mulf %3, %4 {fastmathFlags = #llvm.fastmath} : f64
%6 = affine.load %arg0[%arg8 + 7, %arg6 + 1, %arg7 + 1] : memref<24x34x59xf64, 1>
%7 = arith.mulf %3, %6 {fastmathFlags = #llvm.fastmath} : f64
%8 = arith.subf %5, %7 {fastmathFlags = #llvm.fastmath} : f64
%9 = affine.load %arg4[%arg6 + 2] : memref<34xf64, 1>
%10 = arith.mulf %9, %2 {fastmathFlags = #llvm.fastmath} : f64
%11 = affine.load %arg1[%arg8 + 7, %arg6 + 2, %arg7 + 1] : memref<24x35x59xf64, 1>
%12 = arith.mulf %10, %11 {fastmathFlags = #llvm.fastmath} : f64
%13 = affine.load %arg4[%arg6 + 1] : memref<34xf64, 1>
%14 = arith.mulf %13, %2 {fastmathFlags = #llvm.fastmath} : f64
%15 = affine.load %arg1[%arg8 + 7, %arg6 + 1, %arg7 + 1] : memref<24x35x59xf64, 1>
%16 = arith.mulf %14, %15 {fastmathFlags = #llvm.fastmath} : f64
%17 = arith.subf %12, %16 {fastmathFlags = #llvm.fastmath} : f64
%18 = arith.addf %8, %17 {fastmathFlags = #llvm.fastmath} : f64
%19 = affine.load %arg5[%arg6 + 1] : memref<34xf64, 1>
%20 = arith.divf %18, %19 {fastmathFlags = #llvm.fastmath} : f64
%21 = arith.mulf %2, %cst {fastmathFlags = #llvm.fastmath} : f64
%22 = arith.addf %21, %20 {fastmathFlags = #llvm.fastmath} : f64
%23 = arith.subf %arg9, %22 {fastmathFlags = #llvm.fastmath} : f64
affine.store %23, %arg2[%arg8 + 8, %arg6 + 1, %arg7 + 1] : memref<25x34x59xf64, 1>
affine.yield %23 : f64
}
}
return
}
```

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.