Skip to content

Cudastf #794

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

Draft
wants to merge 41 commits into
base: main
Choose a base branch
from
Draft
Changes from 1 commit
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
d6dc01d
Update build config to pull CUDASTF
sidelnik Nov 4, 2024
245b20f
remove const expr
sidelnik Nov 4, 2024
9b35ec8
Updates to get basic cudastf functionality working with matx
sidelnik Nov 5, 2024
7d298d4
move to void_interface
sidelnik Nov 5, 2024
154b3f9
add stf executor
sidelnik Nov 5, 2024
c8ef988
support for cgsolve operator and a few examples
sidelnik Nov 5, 2024
52b18c9
make the sync() that is part of stfexecutor call ctx.task_fence()
sidelnik Dec 3, 2024
d726b10
fix typo
sidelnik Dec 3, 2024
5e7576c
Added test case
sidelnik Dec 17, 2024
1373699
Fixes to the sync
sidelnik Dec 17, 2024
92e7204
add support for cgsolve
sidelnik Dec 17, 2024
a608f3f
update to the simple radar code
sidelnik Dec 17, 2024
b062577
minor typo fix
sidelnik Dec 17, 2024
bbf9abc
update version of stf
sidelnik Dec 19, 2024
3e831ea
cleanup constexpr case for stfexecutor
sidelnik Dec 19, 2024
702fe79
cleanup constexpr case for stfexecutor
sidelnik Dec 19, 2024
5bfe21e
add conditional support for cudagraph to the stf executor
sidelnik Dec 19, 2024
f407256
update to latest cudastf
sidelnik Jan 9, 2025
221599c
switch to use logical token
sidelnik Jan 9, 2025
7a5bb6c
update parameters for radar code
sidelnik Jan 9, 2025
0c2432f
update to radar code to work with command line args
sidelnik Jan 9, 2025
3ae267b
cleanup to support different executor
sidelnik Jan 9, 2025
6a75794
cleanup radar code to emit stf and cuda versions
sidelnik Jan 24, 2025
f1facca
test script that runs simple radar with different input sizes. output…
sidelnik Jan 24, 2025
0199e75
enable cuda graphs as a command line argument enableGraphs
sidelnik Jan 24, 2025
39b16f4
add support for the random/randomOp generator
sidelnik Jan 27, 2025
9b7c4b0
get the basic spectrogram code working with stf
sidelnik Jan 27, 2025
f9e09f1
get spectrogram cudagraph code working with stf
sidelnik Jan 27, 2025
6c9a791
add assert in the case stream capture is turned on if creating a plan
sidelnik Feb 10, 2025
a1efd1c
Merge branch 'cudastf' into cudastf_latest
sidelnik Mar 19, 2025
6437eab
Merge pull request #2 from sidelnik/cudastf_latest
sidelnik Mar 19, 2025
bbb9aae
Apps using matx with stf should get these flags
caugonnet Mar 24, 2025
e13c9b6
fix constructor
caugonnet Mar 24, 2025
7244399
fix typo/bug
sidelnik Apr 21, 2025
66f6850
update to example code to fix compile error
sidelnik Apr 21, 2025
89e2a43
update to example code to fix compile error
sidelnik Apr 21, 2025
973886b
update test script for radar code
sidelnik Apr 21, 2025
92885e7
temp fix to the allocator dtor
sidelnik Apr 21, 2025
8607840
remove warning to work with latest stf
sidelnik Apr 21, 2025
14e0985
replace logical token with token
sidelnik Apr 21, 2025
92e04d5
update version to use cccl from main
sidelnik Apr 21, 2025
File filter

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
get spectrogram cudagraph code working with stf
  • Loading branch information
sidelnik committed Jan 27, 2025
commit f9e09f104550ac202e01b4af201160247b0c13fc
36 changes: 32 additions & 4 deletions examples/spectrogram_graph.cu
Original file line number Diff line number Diff line change
Expand Up @@ -62,12 +62,22 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv)
cudaStream_t stream;
cudaStreamCreate(&stream);

cudaExecutor exec{stream};

cudaEvent_t start, stop;
cudaEventCreate(&start);
cudaEventCreate(&stop);

#ifdef USE_STF
std::cout << "Using STF executor\n";
#else
std::cout << "Using CUDA executor\n";
#endif

#ifdef USE_STF
stfExecutor exec{stream};
#else
cudaExecutor exec{stream};
#endif

float fs = 10000;
index_t N = 100000;
float amp = static_cast<float>(2 * sqrt(2));
Expand Down Expand Up @@ -147,15 +157,33 @@ int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv)
}
}


exec.sync();
// Time graph execution of same kernels
cudaEventRecord(start, stream);
#if USE_STF
auto ctx = exec.getCtx();
cudaEventRecord(start, ctx.task_fence());
#else
cudaEventRecord(start, stream);
#endif

for (uint32_t i = 0; i < 10; i++) {
cudaGraphLaunch(instance, stream);
}
#ifdef USE_STF
{
cudaEventRecord(stop, ctx.task_fence());
}
#else
cudaEventRecord(stop, stream);
#endif
exec.sync();

#ifdef USE_STF
{
ctx.finalize();
}
#endif

cudaEventElapsedTime(&time_ms, start, stop);

printf("Spectrogram Time With Graphs = %.2fus per iteration\n",
Expand Down