Skip to content

Create allocate nodes for grid reduction flags#263

Merged
naoyam merged 3 commits intocsarofeen:20_7_6_develfrom
naoyam:declare-grid-reduction-flag
Aug 4, 2020
Merged

Create allocate nodes for grid reduction flags#263
naoyam merged 3 commits intocsarofeen:20_7_6_develfrom
naoyam:declare-grid-reduction-flag

Conversation

@naoyam
Copy link
Copy Markdown
Collaborator

@naoyam naoyam commented Aug 3, 2020

This is to fix #244.

Inserts scalar value allocation nodes before grid reduction nodes.

Additionally, refactors several Val functions to handle kir::Int types.

@naoyam
Copy link
Copy Markdown
Collaborator Author

naoyam commented Aug 3, 2020

@tlemo Thanks for the quick review. I added another commit that just does small refactoring. 89521cc

@tlemo
Copy link
Copy Markdown
Collaborator

tlemo commented Aug 4, 2020

@tlemo Thanks for the quick review. I added another commit that just does small refactoring. 89521cc

Looks fine to me, but what is the rationale for moving getPredicateFlagName to GridReduction?

@naoyam
Copy link
Copy Markdown
Collaborator Author

naoyam commented Aug 4, 2020

@tlemo Thanks for the quick review. I added another commit that just does small refactoring. 89521cc

Looks fine to me, but what is the rationale for moving getPredicateFlagName to GridReduction?

That's because it's only used for GridReuction. Here's just one example usage. T2pred is the flag variable in this case.

  bool T2pred;
  // Allocate global tensor float T7[( T0.size[0] * 2 )];
  // Allocate global tensor int64_t T8[T0.size[0]];
  T2pred = reduction::gridReduce< false, true, false, false, false, true > ( T2[ 0 ], block_result, reduction_add_float, &T7[0], T8, reinterpret_cast<float*>(shared_mem));

@kevinstephano
Copy link
Copy Markdown
Collaborator

Fix is good!

@naoyam naoyam merged commit f183618 into csarofeen:20_7_6_devel Aug 4, 2020
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.

GridReductions with a following op are failing due to Predication

3 participants