Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Enhancements] (Much Better) Loop Fusion and Packed Funcall Mutation (for unrolling/vectorizing/tiling). #49

Merged
merged 18 commits into from
Sep 4, 2024

Conversation

hikettei
Copy link
Owner

@hikettei hikettei commented Sep 2, 2024

TODO in this PR

  • Remove duplicated index computation process by using expr-eq
    • If tmpvar is only used in the kernel; don't allocate, use scalar instead.
  • Implement Loop Collapse in transform.lisp level. (judge the validity based on permutable and coincidence)
  • Implement Loop Unrolling in transform.lisp (Packed Funcall)
  • Implement Symbolic Loop Unrolling by introducing loop-reminder.
  • Unroll the outermost iteration
  • Test Unrolling
  • Pass gemm-test (by fixing invalid shape inference)
  • Fix: !rand compilation segv
  • !softmax in a single kernel
  • Fix for !sum !mean accuracy in CI. (Added loop fusion patterns)
  • Fix: potentially there are still invalid RaW/WaW/WaR
  • Fix: threefry2x32 in two kernels.
  • Eliminate guard node (e.g.: c0 == 0)
    • as well as symbolic mode
    • Appeared in fused !tan, LayerNorm, and ConvND
  • float4 accumlation
  • optimize for :reduction; create float _acc_0
  • Optimize for metal: use float4
  • Compiling !rand in 10s.
  • Simplifier: Fold Scalars
  • Make Symbolic Compilation completely equivalent to static one.
    • Involve shape computation in a VM level op.
  • BEAM Search for determining global_size/local_size
  • Lisp JIT
  • Fuse Conv < 2 Kernels
    • delete guard: c0==0
    • relocated_to_most_nearest
  • Add NN Ops test with restricted accuracy
    • make all tests green
  • BugFix:
(let ((a (make-tensor `(5 5))))
	(caten (!add (!view a `(0 2) `(0 2)) (!view a `(2 4) `(2 4)))))

@hikettei hikettei changed the title Fix Loop Fusion Enhancements on Loop Fusion and Introducing Packed Object for vectorization/unrolling/better memory-locality Sep 3, 2024
@hikettei hikettei changed the title Enhancements on Loop Fusion and Introducing Packed Object for vectorization/unrolling/better memory-locality [Enhancements] Loop Fusion and Packed Object for vectorizing/unrolling/better memory-locality Sep 3, 2024
@hikettei hikettei changed the title [Enhancements] Loop Fusion and Packed Object for vectorizing/unrolling/better memory-locality [Enhancements] (Much Better) Loop Fusion and Packed Object for vectorizing/unrolling/better memory-locality Sep 3, 2024
@hikettei hikettei changed the title [Enhancements] (Much Better) Loop Fusion and Packed Object for vectorizing/unrolling/better memory-locality [Enhancements] (Much Better) Loop Fusion and Packed Object Mutation. Sep 4, 2024
@hikettei hikettei changed the title [Enhancements] (Much Better) Loop Fusion and Packed Object Mutation. [Enhancements] (Much Better) Loop Fusion and Packed Funcall Mutation (for unrolling/vectorizing/tiling). Sep 4, 2024
@hikettei hikettei marked this pull request as ready for review September 4, 2024 06:24
@hikettei hikettei merged commit b0cb64a into main Sep 4, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant