Skip to content

Disable Memory Ordering Dev Build Flag Included in Example Code #13

Description

@EfficientBrad

Per https://github.com/EfficientComputer/deveng/issues/921, --disable-memory-ordering is not intended for public usage at this time, however 16 apps in this repo currently include it.

Applied unconditionally — 13 apps

app file (line) options passed
quickstart app_examples/quickstart/CMakeLists.txt#L8 -DUSE_PRAGMAS --disable-memory-ordering
conv3x3 app_examples/conv3x3/CMakeLists.txt#L8 -DUSE_PRAGMAS --disable-memory-ordering -O3
conv3x3_dw app_examples/conv3x3_dw/CMakeLists.txt#L8 -DUSE_PRAGMAS --disable-memory-ordering
conv3x3xn app_examples/conv3x3xn/CMakeLists.txt#L8 -DUSE_PRAGMAS --disable-memory-ordering
conv5x5 app_examples/conv5x5/CMakeLists.txt#L8 -DUSE_PRAGMAS --disable-memory-ordering --pnr-rounds=8 --mof-passes=convert-parallel-for,lift-scf-parallel --disable-mof-option-exploration
dmm app_examples/dmm/CMakeLists.txt#L8 -I ${CMAKE_SOURCE_DIR}/shared -DUSE_PRAGMAS --disable-memory-ordering
dmm_i8 app_examples/dmm_i8/CMakeLists.txt#L8 -I ${CMAKE_SOURCE_DIR}/shared -DUSE_PRAGMAS --disable-memory-ordering
dmv_fp app_examples/dmv_fp/CMakeLists.txt#L8 -DUSE_PRAGMAS --disable-memory-ordering
fft app_examples/fft/CMakeLists.txt#L8 -DUSE_PRAGMAS --disable-memory-ordering
fir app_examples/fir/CMakeLists.txt#L8 -DUSE_PRAGMAS --disable-memory-ordering --pnr-rounds=10
knapsack app_examples/knapsack/CMakeLists.txt#L8 -DUSE_PRAGMAS --disable-memory-ordering --mof-passes=convert-parallel-for,lift-scf-parallel --disable-mof-option-exploration
smv app_examples/smv/CMakeLists.txt#L8 -I ${CMAKE_SOURCE_DIR}/shared -DUSE_PRAGMAS --disable-memory-ordering --mof-passes=convert-parallel-for,lift-scf-parallel --disable-mof-option-exploration
spadd app_examples/spadd/CMakeLists.txt#L8 -I ${CMAKE_SOURCE_DIR}/shared -DUSE_PRAGMAS --disable-memory-ordering --mof-passes=convert-parallel-for,lift-scf-parallel --disable-mof-option-exploration

Each is a single eff_subtarget_compile_options(<name>_fabric PRIVATE ...) with no enclosing condition. Note that in every case the flag sits mid-line among ordinary tuning options-O3, -I, --pnr-rounds, -DUSE_PRAGMAS. Nothing marks it out, which is why it reads as boilerplate and gets copied along with the rest of the line.

Gated behind if(EFF_BLD_HAND_OPTIMIZED) — 3 apps

app file (line) options passed
bfs app_examples/bfs/CMakeLists.txt#L11 --disable-memory-ordering
cholesky_decomp app_examples/cholesky_decomp/CMakeLists.txt#L11 --disable-memory-ordering
jpeg app_examples/jpeg/CMakeLists.txt#L11 --disable-memory-ordering --mof-passes=convert-parallel-for,lift-scf-parallel --disable-mof-option-exploration --mark-critical-paths

The gate defaults off ([app_examples/CMakeLists.txt#L6]

# set(EFF_BLD_HAND_OPTIMIZED ON)
) is a commented-out # set(EFF_BLD_HAND_OPTIMIZED ON)), so a default build hits only the 13 above. But it is a documented opt-in, not a guard — [app_examples/README.md#L54] https://github.com/EfficientComputer/e1x_examples/blob/7fb3a8600576237a9625c5b3a0aaa6a09c9b74f1/app_examples/README.md)
tells the reader to uncomment that line to build the hand-optimized versions, which walks them into all 16.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions