Skip to content

Commit

Permalink
LBM - benechmark
Browse files Browse the repository at this point in the history
  • Loading branch information
massimim committed Oct 6, 2023
1 parent ed7532e commit 906ace5
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 9 deletions.
20 changes: 11 additions & 9 deletions benchmarks/lbm/src/RunCavityTwoPop.cu
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ auto run(Config& config,
code << "_SS" << config.stencilSemanticCli.getStringOption() << "_";
code << "_SF" << config.spaceCurveCli.getStringOption() << "_";
code << "_TM" << config.transferModeCli.getStringOption() << "_";
code << "_TM" << config.occCli.getStringOption() << "_";
code << "__";
// using PopulationField = typename Grid::template Field<Storage, Lattice::Q>;

Expand Down Expand Up @@ -213,6 +214,7 @@ auto run(Config& config,
std::stringstream& testCode) -> void
{
testCode << "___" << config.N << "_";
testCode << "_numDevs_" << config.devices.size();

if (config.gridType == "dGrid") {
testCode << "_DG";
Expand All @@ -237,15 +239,15 @@ auto run(Config& config,
NEON_THROW_UNSUPPORTED_OPERATION("This option was disables. PLease define NEON_BENCHMARK_DESIGN_OF_EXPERIMENTS to enable it.")
}
}
if (config.gridType == "bGrid_8_8_8") {
if constexpr (!skipTest) {
using Sblock = Neon::domain::details::bGrid::StaticBlock<8, 8, 8>;
using Grid = Neon::domain::details::bGrid::bGrid<Sblock>;
return details::runFilterStoreType<Grid>(config, report, testCode);
} else {
NEON_THROW_UNSUPPORTED_OPERATION("This option was disables. PLease define NEON_BENCHMARK_DESIGN_OF_EXPERIMENTS to enable it.")
}
}
// if (config.gridType == "bGrid_8_8_8") {
// if constexpr (!skipTest) {
// using Sblock = Neon::domain::details::bGrid::StaticBlock<8, 8, 8>;
// using Grid = Neon::domain::details::bGrid::bGrid<Sblock>;
// return details::runFilterStoreType<Grid>(config, report, testCode);
// } else {
// NEON_THROW_UNSUPPORTED_OPERATION("This option was disables. PLease define NEON_BENCHMARK_DESIGN_OF_EXPERIMENTS to enable it.")
// }
// }
// if (config.gridType == "bGrid_2_2_2") {
// if constexpr (!skipTest) {
// using Sblock = Neon::domain::details::bGrid::StaticBlock<2, 2, 2>;
Expand Down
2 changes: 2 additions & 0 deletions libNeonSkeleton/include/Neon/skeleton/Occ.h
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,8 @@ struct OccUtils
auto getStringOptions() const -> std::string;
auto getDoc() const -> std::string;

auto getStringOption() const -> std::string;

auto addToReport(Neon::Report& report, Neon::Report::SubBlock& subBlock) const -> void;
auto addToReport(Neon::Report& report) const -> void;

Expand Down
10 changes: 10 additions & 0 deletions libNeonSkeleton/src/skeleton/Occ.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,16 @@ OccUtils::Cli::Cli(std::string s)
set(s);
}

auto OccUtils::Cli::getStringOption() const -> std::string
{
if (!mSet) {
std::stringstream errorMsg;
errorMsg << "Occ was not set.";
NEON_ERROR(errorMsg.str());
}
return OccUtils::toString(mOption);
}

OccUtils::Cli::Cli(Occ model)
{
mOption = model;
Expand Down

0 comments on commit 906ace5

Please sign in to comment.