Skip to content

Commit

Permalink
Merge pull request #1105 from anarkiwi/v71
Browse files Browse the repository at this point in the history
gr-iqtlabs v71
  • Loading branch information
anarkiwi authored Jan 16, 2024
2 parents ee53894 + 0c391b7 commit bb38325
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
2 changes: 1 addition & 1 deletion docker/Dockerfile.base
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
15 changes: 13 additions & 2 deletions gamutrf/grscan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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="",
Expand Down Expand Up @@ -178,6 +179,7 @@ def __init__(
skip_tune_step,
tuning_ranges,
pretune,
fft_processor_affinity,
)
+ self.get_db_blocks(nfft, samp_rate, scaling)
)
Expand Down Expand Up @@ -348,18 +350,23 @@ def get_offload_fft_blocks(
vkfft,
fft_batch_size,
nfft,
fft_processor_affinity,
):
fft_block = None
fft_roll = False
if self.wavelearner:
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),
Expand Down Expand Up @@ -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,
Expand Down
7 changes: 7 additions & 0 deletions gamutrf/scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down

0 comments on commit bb38325

Please sign in to comment.