Rodinia
Rodinia is working (with only a very bad hack in backprop, but we need multi-returns to fix that). Definitely needs a lot of work to optimize, but everything is running now on CPU and GPU.
This includes a few other changes:
- By default SROA will no longer break products that contain arrays (though it has an option to do that). This is useful because breaking structs with arrays can be very expensive (it can produce extra copies of arrays and gcm seems to struggle with it). This is needed for rodinia because in
cfd
basically 5 arrays are passed in as a single struct (so in Rust a single long array) because this is the style of the original benchmarks (side note: in HPVM they're passed as 5 separate arrays which is a pain and in Rodinia as a single array with annoying magic numbers to get the indexing, our struct of array form is so much nicer to write than that). - Fixes to cpu and gpu intrinsic names
- Because SROA is no longer (by default) breaking products that contain arrays we need the front-end and outlining to generate better return types (in particular avoid singleton and empty products where possible).
- Fixes around
HerculesMutBox
to allow borrowing it for a shorter time then its whole lifetime so that we can read data back using them after execution of the Hercules program (I think this is really just used because of the hack we need to get backprop to work) - Some improvements to Juno syntax related to structs and for-loops (both now support more rust-style syntax in addition to the original style)
- Note: for the rust like loops it now supports code like
for i in 0..=n
which will generate the guarded do-while form but now the condition will be<=
rather than<
, ideally loop bound canonicalization will support this, but I can adjust Juno to just add 1 to the bound and use < if needed
Merge request reports
Activity
requested review from @rarbore2
assigned to @aaronjc4
added 11 commits
-
3146ac3c...44edca09 - 8 commits from branch
main
- f2d464fe - Format hercules_rt
- a19d92d5 - Merge branch 'main' into juno-rodinia
- d9897d35 - cfd was segfaulting due to vectorization and insufficient alignment
Toggle commit list-
3146ac3c...44edca09 - 8 commits from branch
mentioned in issue #26 (closed)
- Resolved by Aaron Councilman
Ran into a weird issue after merge where cfd was suddenly having memory issues, seems to be related to the vector code llvm is generating (due to the align), opened issue #26 (closed) about this.
Edit, not sure that's entirely the issue I guess, the
block_size
change fixed it on my machine but not on mirandaEdited by Aaron Councilman
38 38 * 39 39 * - Write: the write node writes primitive fields in product values - these get 40 40 * replaced by a direct def of the field value 41 * 42 * The allow_sroa_arrays variable controls whether products that contain arrays 43 * will be broken into pieces. This option is useful to have since breaking 44 * these products up can be expensive if it requires destructing and 45 * reconstructing the product at any point. 46 * 47 * TODO: Handle partial selections (i.e. immutable nodes). This will involve 48 * actually tracking each source and use of a product and verifying that all of 49 * the nodes involved are mutable. I think it's less important with multi-returns since once we have that you should generally not have to create products of arrays unless you intentionally want them and so fine-grained control of sroa is probably less important, but this todo is really because sroa will just attempt to replace as many products as it can and doesn't take into account immutable nodes.
mentioned in commit 9e99a426