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

CMake, Recent cuRVE and an ABM-like miniapp #1

Draft
wants to merge 40 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
77e1a8a
Add .gitignore file
ptheywood Apr 19, 2022
daa4c39
Add CMake-based build-system, using components from FLAMEGPU/FLAMEGPU2
ptheywood Apr 19, 2022
a2fc5ae
Add MIT Licence
ptheywood Apr 19, 2022
5d0fb23
Add CI builds via GitHub Actions
ptheywood Apr 19, 2022
a6bdff5
Reduce windows CI builds to 1
ptheywood Apr 19, 2022
15ed9bd
Add CI badges to the readme
ptheywood Apr 19, 2022
ae50721
Add VERBOSE_PTXAS Cmake option for verbose ptxas output
ptheywood Apr 19, 2022
13f9b8e
Add -lDL via CMake
ptheywood Apr 19, 2022
e0cecb1
Initial, incomplete benchmark
ptheywood Apr 19, 2022
8af3296
Minor benchmark tweaks, still unfinished
ptheywood Apr 19, 2022
1e271c3
Fix launching of input kernel
ptheywood Apr 20, 2022
832f030
Add CLI11-based CLI parsing + fix a few issues
ptheywood Apr 20, 2022
ab3468d
Add a readme for the benchmark subproject
ptheywood Apr 20, 2022
121679f
Add basic csv output to stdout
ptheywood Apr 20, 2022
0c5b66f
Slightly nicer CSV handling
ptheywood Apr 20, 2022
8bb8923
Move OutputCSV to it's own file
ptheywood Apr 20, 2022
99c39ad
std::string overloads for nvtx.h
ptheywood Apr 20, 2022
ac247e1
Less manual NVTX ranges
ptheywood Apr 20, 2022
2050b8d
Tidying up, 2 levels of verbosity
ptheywood Apr 20, 2022
1343328
Use modern c++ seeded prng (MT)
ptheywood Apr 20, 2022
79fbf78
Update problem matcher for nvcc device warnings
ptheywood Apr 20, 2022
ddc2b18
disable CUDA 11.6 CI for now, while 3rd party warning breaks Werror
ptheywood Apr 20, 2022
f720ebc
Rename curve.h to curve.cuh
ptheywood Apr 20, 2022
6b7830e
Move curve.cu(h) into curve subdirectories
ptheywood Apr 20, 2022
50aed5d
Add src dirs
ptheywood Apr 20, 2022
055bf0c
Direct, unmodified curve.cuh/curve.cu from FLAMEGPU/FLAMEGPU2 v2.0.0-…
ptheywood Apr 20, 2022
0a5f0d2
Replace FLAMEGPU specfic bits of curve
ptheywood Apr 20, 2022
5973e91
Update example project to use recent flamegpu curve
ptheywood Apr 21, 2022
005dab0
Update abm benchmark to use recent curve and add crude validation
ptheywood Apr 21, 2022
93e39a9
Add unmapping to example
ptheywood Apr 21, 2022
8ba5a14
Rename benchmark -> abm-benchmark, update readmes
ptheywood Apr 21, 2022
31b1380
Change default repetitions to 1
ptheywood Apr 21, 2022
7d608e9
Fix nvtx marker name
ptheywood Apr 21, 2022
d03fc5d
Switch to circles model implementation
ptheywood Apr 21, 2022
8f227d1
Fix debug build compilaton
ptheywood Apr 28, 2022
c728a2d
Add missing <string> include to fix msvc
ptheywood Apr 29, 2022
ba6beba
Attempt to fix Ubuntu CUDA installation
ptheywood Apr 29, 2022
4e4253f
Remove centos cuda install script which is not used in this repo
ptheywood Apr 29, 2022
0095dac
Minor fixes
ptheywood Apr 29, 2022
64d2a3c
Assorted bugfixes
ptheywood May 4, 2022
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
Prev Previous commit
Next Next commit
Use modern c++ seeded prng (MT)
ptheywood committed Apr 20, 2022
commit 1343328917a340d021bb2c90bf9934d6fdb80233
18 changes: 9 additions & 9 deletions benchmark/main.cu
Original file line number Diff line number Diff line change
@@ -12,16 +12,14 @@
#include <tuple>
#include <vector>
#include <string>
#include <random>

#include "cuda_runtime.h"

// CLI library
#include <CLI/CLI.hpp>

// Include the curve header
#include "curve.h"

// Include a number of utilty classes to simplify code in the example itself.
// Include a number of utilty classes to simplify code in the benchmark itself
#include "util/Timer.h"
#include "util/SteadyClockTimer.h"
#include "util/CUDAErrorChecking.cuh"
@@ -30,6 +28,9 @@
#include "util/nvtx.h"
#include "util/OutputCSV.hpp"

// Include the curve header
#include "curve.h"

// Anonymous namespace for locally scoped global state
namespace {
// file-scope only variable used to cache the driver mode
@@ -217,14 +218,13 @@ double initialiseData(const uint64_t SEED, const uint32_t AGENT_COUNT) {
// Start recording the time
timer->start();

// @todo - use modern PRNG
// @todo seed the prng.

std::mt19937_64 prng(SEED);
std::uniform_real_distribution<float> a_dist(0.f, 1.f);
// Initialise data
for (uint32_t idx = 0u; idx < AGENT_COUNT; idx++)
{
float a = rand()/(float)RAND_MAX;
float b = (float) idx;
float a = a_dist(prng);
float b = static_cast<float>(idx);
curveSetFloat(AGENT_A, a, idx);
curveSetFloat(AGENT_B, b, idx);
curveSetFloat(AGENT_C, 0, idx);