From 0c391b703a67e3714efd7fcbe330e2425098a007 Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Tue, 16 Jan 2024 05:52:48 +0000 Subject: [PATCH] gr-iqtlabs v71 --- docker/Dockerfile.base | 2 +- gamutrf/grscan.py | 15 +++++++++++++-- gamutrf/scan.py | 7 +++++++ 3 files changed, 21 insertions(+), 3 deletions(-) diff --git a/docker/Dockerfile.base b/docker/Dockerfile.base index 6f0d1812..0b299d81 100644 --- a/docker/Dockerfile.base +++ b/docker/Dockerfile.base @@ -28,7 +28,7 @@ RUN apt-get update && apt-get install -y --no-install-recommends \ libvulkan-dev \ python3-numpy WORKDIR /root -RUN git clone https://github.com/iqtlabs/gr-iqtlabs -b 1.0.70 +RUN git clone https://github.com/iqtlabs/gr-iqtlabs -b 1.0.71 COPY --from=iqtlabs/gamutrf-vkfft:latest /root /root/gr-iqtlabs WORKDIR /root/gr-iqtlabs/build COPY --from=sigmf-builder /usr/local /usr/local diff --git a/gamutrf/grscan.py b/gamutrf/grscan.py index 49ddbe62..d3c7e9bc 100644 --- a/gamutrf/grscan.py +++ b/gamutrf/grscan.py @@ -37,6 +37,7 @@ def __init__( external_gps_server="", external_gps_server_port=8888, fft_batch_size=256, + fft_processor_affinity=0, freq_end=1e9, freq_start=100e6, gps_server="", @@ -178,6 +179,7 @@ def __init__( skip_tune_step, tuning_ranges, pretune, + fft_processor_affinity, ) + self.get_db_blocks(nfft, samp_rate, scaling) ) @@ -348,6 +350,7 @@ def get_offload_fft_blocks( vkfft, fft_batch_size, nfft, + fft_processor_affinity, ): fft_block = None fft_roll = False @@ -355,11 +358,15 @@ def get_offload_fft_blocks( fft_block = self.wavelearner.fft(int(fft_batch_size * nfft), nfft, True) fft_roll = True elif vkfft: + # VkFFT handles batches by using set_multiple_output(), so we do not need + # to wrap it. fft_block = self.iqtlabs.vkfft(fft_batch_size, nfft, True) - else: fft_batch_size = 1 + else: fft_block = fft.fft_vcc(nfft, True, [], True, 1) + fft_batch_size = 1 fft_block.set_thread_priority(99) + fft_block.set_processor_affinity([fft_processor_affinity]) fft_blocks = [ self.apply_window(nfft, fft_batch_size), @@ -390,9 +397,13 @@ def get_fft_blocks( skip_tune_step, tuning_ranges, pretune, + fft_processor_affinity, ): fft_batch_size, fft_blocks = self.get_offload_fft_blocks( - vkfft, fft_batch_size, nfft + vkfft, + fft_batch_size, + nfft, + fft_processor_affinity, ) self.retune_pre_fft = self.get_pretune_block( fft_batch_size, diff --git a/gamutrf/scan.py b/gamutrf/scan.py index c2cae37d..f079b725 100644 --- a/gamutrf/scan.py +++ b/gamutrf/scan.py @@ -314,6 +314,13 @@ def argument_parser(): default=256, help="offload FFT batch size", ) + parser.add_argument( + "--fft_processor_affinity", + dest="fft_processor_affinity", + type=int, + default=0, + help="FFT processor affinity", + ) parser.add_argument( "--vkfft", dest="vkfft",