Rust 使用NVTX 来做 GPU/CPU 性能分析
nvtx
是 NVIDIA®Tools Extension SDK (NVTX)的 Rust banding, 使用该库,可以方便我们集成到 NVIDIA提供工具中(例如 NVIDIA®Tools),方便我们进行性能剖析.
原文链接:https://simbleau.github.io/blog/gpu-profiling-with-rust/
nvtx 的 Rust binding:https://github.com/simbleau/nvtx
serde_json::to_string()
什么时候会失败
serde_json
我们经常会用到, 最常用的基本是两个:
serde_json::from_str
返回 Resultserde_json::to_string()
也返回 Result
from_str
返回 Result 的场景很多, 但是 to_string
是不常见的, 作者用了几年之后才遇到.
详细见原文.
原文链接:https://www.greyblake.com/blog/when-serde-json-to-string-fails/