Skip to content

Instantly share code, notes, and snippets.

@mingfeima
Last active May 22, 2019 01:42
Show Gist options
  • Save mingfeima/032d625e8230ca8e208f597074d38ec9 to your computer and use it in GitHub Desktop.
Save mingfeima/032d625e8230ca8e208f597074d38ec9 to your computer and use it in GitHub Desktop.
vtune tips

Hotspot analysis:

/opt/intel/vtune_amplifier/bin64/amplxe-cl -collect hotspots -knob analyze-openmp=true -knob sampling-interval=10 --resume-after 5 -d 20 \
  -- /home/mingfeim/pytorch/unit_tests/run.sh
/opt/intel/vtune_amplifier/bin64/amplxe-cl -archive -r $1

Interpret vtune log function names: e.g.

  input: _ZN2at12parallel_forIZNS_6native12_GLOBAL__N_19dim_applyIZZZNS1_12topk_out_cpuERNS_6TensorES5_RKS4_llbbENKUlvE_clEvENKUlvE2_clEvEUllN3c108ArrayRefIS4_EEE_EEvSC_lT_EUlllE_EEvlllRKSE_._omp_fn.10
  c++filt [input_func_name]
  output: void at::parallel_for<void at::native::(anonymous namespace)::dim_apply<at::native::topk_out_cpu(at::Tensor&, at::Tensor&, at::Tensor const&, long, long, bool, bool)::{lambda()#1}::operator()() const::{lambda()#4}::operator()() const::{lambda(long, c10::ArrayRef<at::Tensor>)#1}>(c10, long, at::native::topk_out_cpu(at::Tensor&, at::Tensor&, at::Tensor const&, long, long, bool, bool)::{lambda()#1}::operator()() const::{lambda()#4}::operator()() const::{lambda(long, c10::ArrayRef<at::Tensor>)#1})::{lambda(long, long)#1}>(long, long, long, c10::ArrayRef<at::Tensor> const&) [clone ._omp_fn.10]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment