From c49dbb1716589ce805806abc40b0239e4035541e Mon Sep 17 00:00:00 2001 From: vhnatyk Date: Wed, 29 Mar 2023 04:16:35 +0200 Subject: [PATCH] nvtx profiling as feature --- fast-danksharding/Cargo.toml | 1 + fast-danksharding/src/fast_danksharding.rs | 3 +++ 2 files changed, 4 insertions(+) diff --git a/fast-danksharding/Cargo.toml b/fast-danksharding/Cargo.toml index 852a638..bfc03b9 100644 --- a/fast-danksharding/Cargo.toml +++ b/fast-danksharding/Cargo.toml @@ -15,6 +15,7 @@ ark-ff = "0.3.0" ark-poly = "0.3.0" ark-ec = { version = "0.3.0", features = [ "parallel" ] } ark-bls12-381 = { version = "0.3.0", optional = true } +nvtx = { version="1.1.1", optional = true } [build-dependencies] cc = { version = "1.0", features = ["parallel"] } diff --git a/fast-danksharding/src/fast_danksharding.rs b/fast-danksharding/src/fast_danksharding.rs index efcd20f..b47b739 100644 --- a/fast-danksharding/src/fast_danksharding.rs +++ b/fast-danksharding/src/fast_danksharding.rs @@ -4,6 +4,9 @@ use icicle_utils::{field::Point, *}; use crate::{matrix::*, utils::*, *}; +#[cfg(feature = "nvtx")] +use nvtx::{range_pop, range_push}; + pub const FLOW_SIZE: usize = 1 << 12; //4096 //prod flow size pub const TEST_SIZE_DIV: usize = 1; //TODO: Prod size / test size for speedup pub const TEST_SIZE: usize = FLOW_SIZE / TEST_SIZE_DIV; //test flow size