Skip to content

Commit

Permalink
Rename simple_pipeline to simple_radar_pipeline for added clarity (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
awthomp authored Oct 17, 2022
1 parent b0398ca commit 2b8e3cd
Show file tree
Hide file tree
Showing 16 changed files with 51 additions and 51 deletions.
2 changes: 1 addition & 1 deletion bench/01_radar/SingleChanSimplePipeline.cu
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#include <nvbench/nvbench.cuh>
#include "simple_pipeline.h"
#include "simple_radar_pipeline.h"
#include "matx.h"

using namespace matx;
Expand Down
2 changes: 1 addition & 1 deletion docs/_sources/creation.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ All ``make_``-style functions return a ``tensor_t`` object with the template par
only has two required template parameters (type and rank). For simple cases where only implicitly-allocated memory is needed, the default constructor
will suffice. Some situations prevent using the ``make_`` functions, such as when a tensor variable is a class member variable. In this case the type of
the member variable must be specified in the member list. In these scenaries it's expected that the user knows what they are doing and can handle
spelling out the types themselves. For examples of this, see the simple_pipeline files.
spelling out the types themselves. For examples of this, see the simple_radar_pipeline files.

All make functions take the data type as the first template parameter.

Expand Down
2 changes: 1 addition & 1 deletion docs/creation.html
Original file line number Diff line number Diff line change
Expand Up @@ -449,7 +449,7 @@ <h2>Creating Tensors<a class="headerlink" href="#id1" title="Permalink to this h
only has two required template parameters (type and rank). For simple cases where only implicitly-allocated memory is needed, the default constructor
will suffice. Some situations prevent using the <code class="docutils literal notranslate"><span class="pre">make_</span></code> functions, such as when a tensor variable is a class member variable. In this case the type of
the member variable must be specified in the member list. In these scenaries it’s expected that the user knows what they are doing and can handle
spelling out the types themselves. For examples of this, see the simple_pipeline files.</p>
spelling out the types themselves. For examples of this, see the simple_radar_pipeline files.</p>
<p>All make functions take the data type as the first template parameter.</p>
<section id="make-variants">
<h3>Make Variants<a class="headerlink" href="#make-variants" title="Permalink to this headline"></a></h3>
Expand Down
2 changes: 1 addition & 1 deletion docs_input/api/nvtx.rst
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ NVTX Examples
* - MATX_NVTX_END_RANGE(1)
- Ends the NVTX range of range with a handle of 1 used in NVTX_START_RANGE

Code examples are provided in the ``simple_pipeline`` code to show user utilization of the MatX NVTX API.
Code examples are provided in the ``simple_radar_pipeline`` code to show user utilization of the MatX NVTX API.

MatX NVTX API
-----------------
Expand Down
2 changes: 1 addition & 1 deletion docs_input/creation.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ All ``make_``-style functions return a ``tensor_t`` object with the template par
only has two required template parameters (type and rank). For simple cases where only implicitly-allocated memory is needed, the default constructor
will suffice. Some situations prevent using the ``make_`` functions, such as when a tensor variable is a class member variable. In this case the type of
the member variable must be specified in the member list. In these scenaries it's expected that the user knows what they are doing and can handle
spelling out the types themselves. For examples of this, see the simple_pipeline files.
spelling out the types themselves. For examples of this, see the simple_radar_pipeline files.

All make functions take the data type as the first template parameter.

Expand Down
72 changes: 36 additions & 36 deletions docs_input/notebooks/04_radar_pipeline.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,25 @@
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# GPU-Accelerated Numerical Computing with MatX"
],
"metadata": {}
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Tutorial List\n",
"1. [Introduction](01_introduction.ipynb)\n",
"2. [Operators](02_operators.ipynb)\n",
"3. [Executors](03_executors.ipynb)\n",
"4. Radar Pipeline Example] (this tutorial)"
],
"metadata": {}
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Basic Radar Pipeline\n",
"This lesson uses several of the MatX features from previous lessons to show an entire radar signal processing pipeline inside of a single class. The processing is broken down into four parts:\n",
Expand All @@ -31,7 +32,7 @@
"\n",
"These functions each run serially in the same stream and use the output from the previous step as input. The stream is an input to the class constructor, so multiple radar pipelines can be instantiated and run in parallel in different streams. \n",
"\n",
"Each pass of this processing chain works across a set of input pulses, and the pipeline would continuously run as more pulses arrive. A full example of this radar pipeline can be found in the MatX source code under examples/simple_pipeline.cu.\n",
"Each pass of this processing chain works across a set of input pulses, and the pipeline would continuously run as more pulses arrive. A full example of this radar pipeline can be found in the MatX source code under examples/simple_radar_pipeline.cu.\n",
"\n",
"### Setup\n",
"#### Member Variables\n",
Expand Down Expand Up @@ -86,27 +87,27 @@
" auto rv = radar.GetNormT().Slice<1>({0, 0, 0}, {matxSliceDim, matxSliceDim, 16});\n",
" rv.Print();\n",
"```\n"
],
"metadata": {}
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!./exercises/compile_and_run.sh example4_init"
],
"outputs": [],
"metadata": {}
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"The last part of the constructor performs prefetching of all data objects. This ensures that our data is paged into GPU memory and not just resident on the CPU. Without performing this step, the first pass of the pipeline will run slower due to the page faults."
],
"metadata": {}
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Pulse Compression\n",
"Pulse compression is a technique used in radar signal processing for improving the range resolution and for determining how close two targets are together. Typically long pulses are needed to capture enough energy back from the target, but longer pulses are worse for differentiating target range. Pulse compression modulates a long pulse in either time or phase to increase the range.\n",
Expand Down Expand Up @@ -165,20 +166,20 @@
"```\n",
"\n",
"Finally, we print a portion of the signal to show the final pulse compression results."
],
"metadata": {}
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!./exercises/compile_and_run.sh example4_pc"
],
"outputs": [],
"metadata": {}
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Pulse Canceller\n",
"A pulse canceller filters a signal to help differentiate between background noise and stationary objects (like mountains) using a high-pass filter. The filter taps have been pre-defined inside the constructor section above. The filtering is implemented with a time domain convolution, which uses the `conv1d` function on the input signal. Before the convolution happens, two sliced and permuted views are created:\n",
Expand All @@ -195,20 +196,20 @@
"```\n",
"\n",
"We use convolution mode `MATX_C_MODE_SAME` to keep the input and output signals the same size, effectively cutting off the filter ramp-up and ramp-down time. Viewing a portion of each signal shows the convolution inputs and outputs:"
],
"metadata": {}
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!./exercises/compile_and_run.sh example4_tpc"
],
"outputs": [],
"metadata": {}
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Doppler Processing\n",
"The Doppler processing step converts the range-pulse data to range-Doppler data by taking an FFT in the Doppler (pulses) dimension. Doppler processing is often use to differentiate slow moving objects (birds, hot air balloons, etc) from fast moving objects (like planes and rockets). Before performing the FFT, a Hamming window is applied to each pulse by using the `hamming_y` function:\n",
Expand All @@ -225,20 +226,20 @@
"```\n",
"\n",
"Note that the FFT takes a permuted view as input. When possible, MatX will detect the permuted view and pass this into the underlying FFT library as a large stride. This can be inefficient in certain cases, and it may make sense to call `transpose` prior to the FFT to transpose the data in memory before calling the FFT."
],
"metadata": {}
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!./exercises/compile_and_run.sh example4_doppler -lcufft"
],
"outputs": [],
"metadata": {}
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## CFAR Detection\n",
"The last step in the pipeline is the constant false alarm rate (CFAR) detection. CFAR detection is broadly used to filter observible signals from noise by setting a threshold for observation. A filter mask was created in the constructor to represent the \"field of view\" that we are looking for a target in. By describing the field of view, we can differentiate what parts of the signal we believe are signal power and noise power. \n",
Expand Down Expand Up @@ -302,25 +303,24 @@
"```c++\n",
"matxExecuteOp(calcDets(dets, xdPow, baTrim, normTrim, pfa), stream);\n",
"```"
],
"metadata": {}
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"!./exercises/compile_and_run.sh example4_cfar -lcufft"
],
"outputs": [],
"metadata": {}
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## Conclusion\n",
"In this tutorial we showed how to use MatX to implement an entire radar processing pipeline. Using a class structure, we created code that was composable and easy to start as many pipelines in parallel as we need. This could extend to multiple devices on the same stream or even multiple GPUs with only a few more lines of code. We also introduced a custom operator, convolution functions, and several ways to use a `View` when working with these transformations. By looking over the `simple_pipeline.h` example in the MatX source, you should be equipped with the knowledge needed to create your own application in MatX. For more examples please see the documentation or examples. "
],
"metadata": {}
"In this tutorial we showed how to use MatX to implement an entire radar processing pipeline. Using a class structure, we created code that was composable and easy to start as many pipelines in parallel as we need. This could extend to multiple devices on the same stream or even multiple GPUs with only a few more lines of code. We also introduced a custom operator, convolution functions, and several ways to use a `View` when working with these transformations. By looking over the `simple_radar_pipeline.h` example in the MatX source, you should be equipped with the knowledge needed to create your own application in MatX. For more examples please see the documentation or examples. "
]
}
],
"metadata": {
Expand All @@ -338,4 +338,4 @@
},
"nbformat": 4,
"nbformat_minor": 2
}
}
2 changes: 1 addition & 1 deletion docs_input/notebooks/exercises/example4_cfar.cu
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
//
/////////////////////////////////////////////////////////////////////////////////////////

#include "simple_pipeline.h"
#include "simple_radar_pipeline.h"

int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv)
{
Expand Down
2 changes: 1 addition & 1 deletion docs_input/notebooks/exercises/example4_doppler.cu
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
//
/////////////////////////////////////////////////////////////////////////////////////////

#include "simple_pipeline.h"
#include "simple_radar_pipeline.h"

int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv)
{
Expand Down
2 changes: 1 addition & 1 deletion docs_input/notebooks/exercises/example4_init.cu
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
//
/////////////////////////////////////////////////////////////////////////////////////////

#include "simple_pipeline.h"
#include "simple_radar_pipeline.h"

int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv)
{
Expand Down
2 changes: 1 addition & 1 deletion docs_input/notebooks/exercises/example4_pc.cu
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
//
/////////////////////////////////////////////////////////////////////////////////////////

#include "simple_pipeline.h"
#include "simple_radar_pipeline.h"

int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv)
{
Expand Down
2 changes: 1 addition & 1 deletion docs_input/notebooks/exercises/example4_tpc.cu
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
//
/////////////////////////////////////////////////////////////////////////////////////////

#include "simple_pipeline.h"
#include "simple_radar_pipeline.h"

int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv)
{
Expand Down
2 changes: 1 addition & 1 deletion examples/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
set(examples
simple_pipeline
simple_radar_pipeline
recursive_filter
convolution
fft_conv
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
/////////////////////////////////////////////////////////////////////////////////

#include "simple_pipeline.h"
#include "simple_radar_pipeline.h"

int main([[maybe_unused]] int argc, [[maybe_unused]] char **argv)
{
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions test/01_radar/MultiChannelRadarPipeline.cu
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@

#include "assert.h"
#include "matx.h"
#include "simple_pipeline.h"
#include "simple_radar_pipeline.h"
#include "test_types.h"
#include "utilities.h"
#include "gtest/gtest.h"
Expand All @@ -44,7 +44,7 @@ protected:
assert(numSamples > waveformLength);

pb = std::make_unique<detail::MatXPybind>();
pb->InitTVGenerator<T>("01_radar", "simple_pipeline",
pb->InitTVGenerator<T>("01_radar", "simple_radar_pipeline",
{numPulses, numSamples, waveformLength});

// Set the number of channels before running
Expand Down
2 changes: 1 addition & 1 deletion test/test_vectors/generators/01_radar.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from typing import Dict, List


class simple_pipeline:
class simple_radar_pipeline:
def __init__(self, dtype: str, size: List[int]):
self.size = size
self.dtype = dtype
Expand Down

0 comments on commit 2b8e3cd

Please sign in to comment.