Skip to content

Commit

Permalink
Implement NVTXW export
Browse files Browse the repository at this point in the history
  • Loading branch information
evanramos-nvidia committed Sep 17, 2024
1 parent 1b88e07 commit 45af5c7
Show file tree
Hide file tree
Showing 5 changed files with 533 additions and 2 deletions.
115 changes: 115 additions & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ rust-version = "1.74"
default = []
client = ["dep:reqwest", "dep:url"]
server = ["dep:actix-cors", "dep:actix-web"]
nvtxw = ["dep:nvtxw"]

[dependencies]
egui = "0.25.0"
Expand Down Expand Up @@ -53,6 +54,9 @@ url = { version = "2", optional = true }
actix-web = { version = "4", optional = true }
actix-cors = { version = "0.6", optional = true }

# nvtxw:
# nvtxw = { git = "", branch = "", optional = true } # TBD
nvtxw = { path = "crate-tmp", optional = true }

# native:
[target.'cfg(not(target_arch = "wasm32"))'.dependencies]
Expand Down
3 changes: 1 addition & 2 deletions crate-tmp/src/nvtxw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,12 @@ pub use nvtxw_bindings::nvtxPayloadSchemaEntry_t as PayloadSchemaEntry;
use nvtxw_bindings::nvtxwGetInterface_t as GetInterface;
pub use nvtxw_bindings::nvtxwInterfaceCore_t as InterfaceCore;
pub use nvtxw_bindings::nvtxwResultCode_t as ResultCode;
assert_type_eq_all!(i32, ResultCode);
use nvtxw_bindings::nvtxwSessionAttributes_t as SessionAttributes;
pub use nvtxw_bindings::nvtxwSessionHandle_t as SessionHandle;
use nvtxw_bindings::nvtxwStreamAttributes_t as StreamAttributes;
pub use nvtxw_bindings::nvtxwStreamHandle_t as StreamHandle;

assert_type_eq_all!(i32, nvtxw_bindings::nvtxwResultCode_t);

pub struct InterfaceHandle {
core: InterfaceCore,
module_handle: *mut c_void,
Expand Down
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ pub mod deferred_data;
pub mod file_data;
pub mod http;
pub mod merge_data;
#[cfg(feature = "nvtxw")]
pub mod nvtxw;
#[cfg(not(target_arch = "wasm32"))]
pub mod parallel_data;
pub mod timestamp;
Loading

0 comments on commit 45af5c7

Please sign in to comment.