Repository navigation
feat: add kokkos backend through codegen #12
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
Open
Sh0g0-1758
wants to merge
81
commits into
main
Choose a base branch
from
kokkos_back
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 1 commit
Commits
Show all changes
81 commits
Select commit
Hold shift + click to select a range
1775fb1
nits
Sh0g0-1758 2f7cd1d
blech
Sh0g0-1758 1339c21
Co-authored-by: Anant jain <anant37289@users.noreply.github.com>
Sh0g0-1758 7a93362
Revert "Co-authored-by: Anant jain <anant37289@users.noreply.github.c…
Sh0g0-1758 6bfabba
Revert "blech"
Sh0g0-1758 6d298a0
okay
Sh0g0-1758 62eba90
ho
Sh0g0-1758 e158c20
Revert "ho"
Sh0g0-1758 b1c70ea
hahaha
Sh0g0-1758 6e62642
success
Sh0g0-1758 cfb4dbd
it works
Sh0g0-1758 aadeaf7
use more kokkos
Sh0g0-1758 f74d0ec
test more functionality on cpu
Sh0g0-1758 1f82f03
cmake build switch
Sh0g0-1758 fd5c8d5
Revert "cmake build switch"
Sh0g0-1758 6290e72
Improved dot
AdvaitTahilyani 81c2663
Fixed random gen
AdvaitTahilyani d0b1b6d
Fixed axpy
AdvaitTahilyani ecd8dc7
test a working kokkos codegen pipeline
Sh0g0-1758 1076d96
kokkos backend codegen for primitive ops
Sh0g0-1758 e2e9990
tested functional correctness
Sh0g0-1758 0c3b2a1
kokkos backend for custom binary/unary ops
Sh0g0-1758 0264429
kokkos backend for custom operation
Sh0g0-1758 81f6b5c
faster hash, faster strings, better codegen to produce less kernels
Sh0g0-1758 d5d8035
isolate codegen into a retargetable class
Sh0g0-1758 1fae48c
remove further dependence on vec_map
Sh0g0-1758 2bcca88
isolate execute and generate/compile kernel
Sh0g0-1758 7c16dca
pre-compile optimization to avoid repeated so file creation for same …
Sh0g0-1758 beb5627
fix unary and binary ops by taking fptr from moved object and passing…
Sh0g0-1758 025ba0e
self contained functionally correct cpu build with kokkos backend
Sh0g0-1758 0b83ed7
hardware agnostic build
Sh0g0-1758 fdd0c1e
add gpu link options
Sh0g0-1758 53bc7a0
fix cmake dependence issue
Sh0g0-1758 93de0c2
fix gpu linking
Sh0g0-1758 2c81aa1
fix multi pe error: load library on each pe through group
Sh0g0-1758 0d59042
Missing Includes on MacOS
AdvaitTahilyani e4dc7da
Switched to kokkos 2d
AdvaitTahilyani 45e2aa2
Updated to use kokkos instead of eigen
AdvaitTahilyani 9b536cc
generalize codegen to nD views
Sh0g0-1758 c969261
codegen for matrix
Sh0g0-1758 a30231f
fix indexing issue, fix pup issue and run correctness checks
Sh0g0-1758 213b8b0
add indexing to custom unops/binops
Sh0g0-1758 c1f1391
cleanup
Sh0g0-1758 becd705
Fixed issues for GPU compatibility
AdvaitTahilyani 0c5c51c
use concepts to specialize operators and disambiguate them from arith…
Sh0g0-1758 fe4d81b
fix indexing scheme for where
Sh0g0-1758 c8c3dea
C++14 type_traits
Sh0g0-1758 873607f
fix vec type check for binop
Sh0g0-1758 62e0f6c
aadding direct ops
5724da3
clang fmt + lib from lib64 + restore vector.cpp + get name instead of…
anant37289 0378b38
ctors for python AST -> flattened AST conversion
Sh0g0-1758 882915f
Merge pull request #14 from anant37289/ops_direct
Sh0g0-1758 7804b2f
Fixed dot
AdvaitTahilyani ae98fc3
GPU Fix
AdvaitTahilyani f537beb
fix unary/binary for charmnumerics
Sh0g0-1758 1fc5913
fix where op indexing
Sh0g0-1758 91387a2
remove bugs in unops, add print for binops
anant37289 c45e9b2
expose matmul as a separate op
Sh0g0-1758 5f923e6
fix matmul constructor by actually allocating space for it in the map
Sh0g0-1758 915dcda
log base support
anant37289 7ce8496
make axpy a custom binary operation
anant37289 fe0e7f2
pass in broadcasted scalars as a runtime param to reduce number of ke…
Sh0g0-1758 d23b616
nit
Sh0g0-1758 99bf425
feat: ct backend for AST fusion using decorators (#15)
anant37289 4a26839
dealloc (#16)
Sh0g0-1758 43a9ae3
Revert "dealloc (#16)"
Sh0g0-1758 91f60ca
Reapply "dealloc (#16)"
Sh0g0-1758 a3ff151
gpu setup script + different deletion stratergy
anant37289 18d0cce
patched for matrix on GPU
anant37289 1815280
First CI/CD Test
AdvaitTahilyani e6b4da7
Improved CI with testing
AdvaitTahilyani a1f8ac6
Removed unnecessary build step
AdvaitTahilyani 8f0e91a
use parallel_reduce for sum
Sh0g0-1758 28a6f68
kokkos kernels for cpu
anant37289 462eb65
nit
Sh0g0-1758 e8f5f29
update setup scripts to use the latest release
anant37289 e8e10d3
mat-vec reduction to nodegroup design
Sh0g0-1758 cb38a01
data transfer scheme for vec-mat
Sh0g0-1758 ba21a03
copy to host
Sh0g0-1758 92e696f
back to sizes
Sh0g0-1758 92c3506
fix race condition
Sh0g0-1758 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,26 @@ | ||
| if [ -d "./kokkos/install" ]; then | ||
| echo "Kokkos Found at ${PWD}/kokkos/install" | ||
| else | ||
| git clone https://github.com/kokkos/kokkos.git | ||
| cd kokkos | ||
| rm -rf build | ||
| mkdir build | ||
| cd build | ||
| pwd | ||
|
|
||
| # ensure that you have cmake/3.27.9 cuda/12.4.0 and eigen[for later] loaded | ||
|
|
||
| ## for delta please run these before running the setup script | ||
| # module load cuda/12.4.0 | ||
| # module load eigen | ||
| # module load cmake/3.27.9 | ||
|
|
||
| ## The best practice is to let cmake autodetect the architecture, please run on a GPU syster or add a srun | ||
| srun cmake -DBUILD_SHARED_LIBS=ON .. -DKokkos_ENABLE_CUDA=ON | ||
| pwd | ||
|
Collaborator
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
| make -j${nproc} | ||
| cd .. | ||
| mkdir install | ||
| cmake --install build --prefix install | ||
| cd .. | ||
| fi | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you make this a class member @anant37289