Skip to content

Conversation

@jeremylt
Copy link
Member

Last step in the *gen refactor. This will allow us to run operators that have a mix of tensor product and non-tensor bases. 2D is easier, 3D will take more thought.

@jeremylt
Copy link
Member Author

jeremylt commented Feb 26, 2025

Sample "flat" version

template <int P_1D, int Q_1D>
inline __device__ void WeightTensor2dFlattened(SharedData_Cuda &data, const CeedScalar *__restrict__ q_weight_1d, CeedScalar *w) {
  const int max = P_1D < Q_1D ? P_1D : Q_1D;

  WeightTensor2d_Core<Q_1D>(data, data.t_id_x % max, data.t_id_x / max, q_weight_1d, w);
}

data.t_id_x goes up to max(P_1D * P_1D, Q_1D * Q_1D) here, so to map back to the old version we need to pass t_id_x % max to use as the tensor t_id_x and t_id_y / max to use as the tensor t_id_y.

@jeremylt
Copy link
Member Author

Ok, I need to check on the memory in the data.slice for this approach

Also.... I'm not sure how 3D will be tackled

@jeremylt
Copy link
Member Author

Ok, there's going to need to be more disentangling, as the operator I'm trying to target has different dim for different nodal spaces

@jeremylt
Copy link
Member Author

jeremylt commented Mar 3, 2025

Ok, separate dims for each field now, but theres some bug that's giving wrong results

@jeremylt
Copy link
Member Author

jeremylt commented Mar 7, 2025

ugh, T_1D is wrong for this strategy. Pondering

Idea - move slice or stand up fully separate versions? Probably the fully separate is the way to go at this point

@jeremylt
Copy link
Member Author

Getting closer. 2D Tensor + 3D NonTensor is working now. Need 3D Tensor + 3D NonTensor next.

@jeremylt
Copy link
Member Author

I'm starting to think this was not worth any of the time spent here - I think the restrictions also need to be hacked around with. I'm going to abandon this effort for now and switch to AtPoints assembly

@jeremylt jeremylt force-pushed the jeremy/gen-mixed branch 3 times, most recently from 292b18f to 8e1cf66 Compare March 12, 2025 20:23
@jeremylt
Copy link
Member Author

Holy crap, we've got non-tensor with 2D tensor working perfectly now. Just need non-tensor with 3D tensor.

@jeremylt jeremylt force-pushed the jeremy/gen-mixed branch 8 times, most recently from 4d404ab to 9a751b7 Compare March 14, 2025 20:58
@jeremylt jeremylt force-pushed the jeremy/gen-mixed branch 2 times, most recently from abac4c0 to f33ffa5 Compare March 17, 2025 21:18
@jeremylt
Copy link
Member Author

Ok, ready for review. Plan is squash + merge

@jeremylt jeremylt added this to the v0.13 milestone Mar 19, 2025
@jeremylt jeremylt merged commit 4b6745b into main Mar 21, 2025
29 checks passed
@jeremylt jeremylt deleted the jeremy/gen-mixed branch March 21, 2025 15:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants