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

[WIP] Tag / debug tape recordings #2343

Open
wants to merge 21 commits into
base: develop
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
3801e4d
Throw error message in case the multizone discrete adjoint solver wil…
oleburghardt Aug 14, 2024
0e5f95b
Softcode indentifier/index.
oleburghardt Aug 15, 2024
dc38cc3
Add tag type option to build system.
oleburghardt Aug 15, 2024
19a1a70
Add option to use RealReverseTag as AD type.
oleburghardt Aug 25, 2024
36c922e
Temporarily adjust/hardcode type size for memory alignment in vectori…
oleburghardt Aug 25, 2024
84e97f4
added turbo obj funcs
joshkellyjak Aug 29, 2024
e68f844
Merge branch 'develop' into feature_mz_adjoint_for_turbo
joshkellyjak Aug 29, 2024
bb0831d
thems the breaks
joshkellyjak Aug 29, 2024
4327942
Merge branch 'feature_mz_adjoint_for_turbo' of https://github.com/su2…
joshkellyjak Aug 29, 2024
9f1b07c
Merge remote-tracking branch 'upstream/feature_tag_debug_tape' into f…
joshkellyjak Sep 2, 2024
6e65dd1
Add config option and indicator for a debug discrete adjoint run.
oleburghardt Sep 24, 2024
82f69e9
Add routines for setting tags to AD structure.
oleburghardt Sep 24, 2024
9de8e93
Add kinds of recording for tag tapes.
oleburghardt Sep 24, 2024
57fbcea
Comment out checks in AD structure whether an identifier is active. T…
oleburghardt Sep 24, 2024
3da17d8
Add first WIP version of the tag debug mode to the (multizone) discre…
oleburghardt Sep 24, 2024
b0e7c86
Fix preaccumulation error in ComputeVorticityAndStrainMag (first debu…
oleburghardt Sep 24, 2024
688797a
Merge branch 'develop' into feature_tag_debug_tape
joshkellyjak Sep 24, 2024
8556c2a
Revert small change (will be added to CoDi soon).
oleburghardt Sep 24, 2024
683de77
Resolves tag errors in turbo mode
joshkellyjak Sep 26, 2024
13ca3f5
Revert "Resolves tag errors in turbo mode"
joshkellyjak Sep 26, 2024
1169606
Merge branch 'feature_tag_debug_tape' of https://github.com/su2code/S…
joshkellyjak Sep 27, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Common/include/parallelization/vectorization.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ class Array : public CVecExpr<Array<Scalar_t, N>, Scalar_t> {
public:
using Scalar = Scalar_t;
enum : size_t { Size = N };
enum : size_t { Align = Size * sizeof(Scalar) };
enum : size_t { Align = Size * 32 };
static constexpr bool StoreAsRef = true;

private:
alignas(Size * sizeof(Scalar)) Scalar x_[N];
alignas(Size * 32) Scalar x_[N];
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would you be okay with replacing 32 by a function to find the next power of 2? (Requirement of alignas.) Or could this be done any better?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For what type is the result not a power of 2?
If we use a fixed number instead of sizeof, arrays of this type may take more space than necessary.

Copy link
Contributor Author

@oleburghardt oleburghardt Aug 26, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The reverse tag type is 24 I think. If sizeof(Scalar) is already a power of 2 that function should of course not change it :)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I see, so the tag doesn't have a float/double part? Then it should be ok to round Size * sizeof(Scalar) to the next power of 2.
Or maybe using Size * alignof(Scalar), that may be more generic and achieve the desired result.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well it does contain at least a double for the primal value (show must go on). I'll check or ask what the remaining bytes are for besides two ints for index and tag. But sizeof(RealReverseTag) = 24.


public:
#define ARRAY_BOILERPLATE \
Expand Down
Loading