Giter Site home page Giter Site logo

Comments (7)

openppl-public avatar openppl-public commented on August 16, 2024

comand: ./pplnn-build/tools/pplnn --onnx-model tests/testdata/conv.onnx --enable-profiling --warmuptimes 3

I tried this command and it worked correctly in my machine. Cound you delete the pplnn-build directory and re-run the build command ./build.sh and try the command above again?

from ppl.nn.

ltj2013 avatar ltj2013 commented on August 16, 2024

You can enable the profiling flag in CMakeLists.
https://github.com/openppl-public/ppl.nn/blob/513e6122dd90f619da0e550a8a3dc5e3184e5c58/CMakeLists.txt#L11

from ppl.nn.

codgeek avatar codgeek commented on August 16, 2024

You can enable the profiling flag in CMakeLists.
https://github.com/openppl-public/ppl.nn/blob/513e6122dd90f619da0e550a8a3dc5e3184e5c58/CMakeLists.txt#L11

seems not work by this flag. this test model conv.onnx still got stuck.

-options="-DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${pplnn_build_dir}/install $*"
+options="-DCMAKE_BUILD_TYPE=Release -DPPLNN_ENABLE_KERNEL_PROFILING=ON -DCMAKE_INSTALL_PREFIX=${pplnn_build_dir}/install $*"
tests/testdata/conv.onnx  --enable-profiling --warmuptimes 3
[INFO][2021-07-05 22:19:38.555][pplnn.cc:700] ppl.nn version: 513e6122dd90f619da0e550a8a3dc5e3184e5c58-dirty
[INFO][2021-07-05 22:19:38.555][pplnn.cc:127] ***** register X86Engine *****
[INFO][2021-07-05 22:19:38.555][simple_graph_partitioner.cc:107] total partition(s) of graph[torch-jit-export]: 1.
[INFO][2021-07-05 22:19:38.555][pplnn.cc:540] ----- input info -----
[INFO][2021-07-05 22:19:38.555][pplnn.cc:543] input[0]:
[INFO][2021-07-05 22:19:38.555][pplnn.cc:544]     name: input
[INFO][2021-07-05 22:19:38.555][pplnn.cc:551]     dim(s): 1 3 4 4
[INFO][2021-07-05 22:19:38.555][pplnn.cc:553]     DataType: FLOAT32
[INFO][2021-07-05 22:19:38.555][pplnn.cc:554]     DataFormat: NDARRAY
[INFO][2021-07-05 22:19:38.555][pplnn.cc:555]     NumBytesIncludePadding: 192
[INFO][2021-07-05 22:19:38.555][pplnn.cc:556]     NumBytesExcludePadding: 192
[INFO][2021-07-05 22:19:38.555][pplnn.cc:559] ----- output info -----
[INFO][2021-07-05 22:19:38.555][pplnn.cc:562] output[0]:
[INFO][2021-07-05 22:19:38.556][pplnn.cc:563]     name: 5
[INFO][2021-07-05 22:19:38.556][pplnn.cc:570]     dim(s): 1 3 5 5
[INFO][2021-07-05 22:19:38.556][pplnn.cc:572]     DataType: FLOAT32
[INFO][2021-07-05 22:19:38.556][pplnn.cc:573]     DataFormat: N16CX
[INFO][2021-07-05 22:19:38.556][pplnn.cc:574]     NumBytesIncludePadding: 1600
[INFO][2021-07-05 22:19:38.556][pplnn.cc:575]     NumBytesExcludePadding: 300
[INFO][2021-07-05 22:19:38.556][pplnn.cc:578] ----------------------
[INFO][2021-07-05 22:19:38.556][pplnn.cc:808] Run() costs: 0.010000 ms.
[INFO][2021-07-05 22:19:38.556][pplnn.cc:816] Run ok
[INFO][2021-07-05 22:19:38.556][pplnn.cc:820] Warm up start for 3 times.
[INFO][2021-07-05 22:19:38.556][pplnn.cc:827] Warm up end.
[INFO][2021-07-05 22:19:38.556][pplnn.cc:835] Profiling start

from ppl.nn.

codgeek avatar codgeek commented on August 16, 2024

comand: ./pplnn-build/tools/pplnn --onnx-model tests/testdata/conv.onnx --enable-profiling --warmuptimes 3

I tried this command and it worked correctly in my machine. Cound you delete the pplnn-build directory and re-run the build command ./build.sh and try the command above again?

I've tried, tests/testdata/conv.onnx still got stuck.

Occasionally i tried another mobileNetV2 model, Profiling run to the end. It seems the conv.onnx sample has something wrong

[INFO][2021-07-05 22:29:08.104][pplnn.cc:700] ppl.nn version: 513e6122dd90f619da0e550a8a3dc5e3184e5c58-dirty
[INFO][2021-07-05 22:29:08.104][pplnn.cc:127] ***** register X86Engine *****
[INFO][2021-07-05 22:29:08.116][simple_graph_partitioner.cc:107] total partition(s) of graph[torch-jit-export]: 1.
[INFO][2021-07-05 22:29:08.139][pplnn.cc:540] ----- input info -----
[INFO][2021-07-05 22:29:08.139][pplnn.cc:543] input[0]:
[INFO][2021-07-05 22:29:08.139][pplnn.cc:544]     name: input
[INFO][2021-07-05 22:29:08.139][pplnn.cc:551]     dim(s): 1 3 224 224
[INFO][2021-07-05 22:29:08.139][pplnn.cc:553]     DataType: FLOAT32
[INFO][2021-07-05 22:29:08.139][pplnn.cc:554]     DataFormat: NDARRAY
[INFO][2021-07-05 22:29:08.139][pplnn.cc:555]     NumBytesIncludePadding: 602112
[INFO][2021-07-05 22:29:08.139][pplnn.cc:556]     NumBytesExcludePadding: 602112
[INFO][2021-07-05 22:29:08.139][pplnn.cc:559] ----- output info -----
[INFO][2021-07-05 22:29:08.139][pplnn.cc:562] output[0]:
[INFO][2021-07-05 22:29:08.139][pplnn.cc:563]     name: output
[INFO][2021-07-05 22:29:08.139][pplnn.cc:570]     dim(s): 1 1000
[INFO][2021-07-05 22:29:08.139][pplnn.cc:572]     DataType: FLOAT32
[INFO][2021-07-05 22:29:08.139][pplnn.cc:573]     DataFormat: NDARRAY
[INFO][2021-07-05 22:29:08.139][pplnn.cc:574]     NumBytesIncludePadding: 4000
[INFO][2021-07-05 22:29:08.139][pplnn.cc:575]     NumBytesExcludePadding: 4000
[INFO][2021-07-05 22:29:08.139][pplnn.cc:578] ----------------------
[INFO][2021-07-05 22:29:08.139][pplnn.cc:808] Run() costs: 9.195000 ms.
[INFO][2021-07-05 22:29:08.139][pplnn.cc:816] Run ok
[INFO][2021-07-05 22:29:08.139][pplnn.cc:820] Warm up start for 3 times.
[INFO][2021-07-05 22:29:08.161][pplnn.cc:827] Warm up end.
[INFO][2021-07-05 22:29:08.161][pplnn.cc:835] Profiling start
[INFO][2021-07-05 22:29:09.164][pplnn.cc:851] Duration: 1002.473000 ms
[INFO][2021-07-05 22:29:09.164][pplnn.cc:861] Average run cost: 7.317321 ms.
[INFO][2021-07-05 22:29:09.164][pplnn.cc:864] Profiling End

from ppl.nn.

codgeek avatar codgeek commented on August 16, 2024

You can enable the profiling flag in CMakeLists.
https://github.com/openppl-public/ppl.nn/blob/513e6122dd90f619da0e550a8a3dc5e3184e5c58/CMakeLists.txt#L11

Actually, I tried and find this PPLNN_ENABLE_KERNEL_PROFILING macro is designed for exporting detailed timing for each op, other than the profiling of just run multi loops, the --enable-profiling is corresponding to the second kind.

from ppl.nn.

ltj2013 avatar ltj2013 commented on August 16, 2024

You can enable the profiling flag in CMakeLists.
https://github.com/openppl-public/ppl.nn/blob/513e6122dd90f619da0e550a8a3dc5e3184e5c58/CMakeLists.txt#L11

Actually, I tried and find this PPLNN_ENABLE_KERNEL_PROFILING macro is designed for exporting detailed timing for each op, other than the profiling of just run multi loops, the --enable-profiling is corresponding to the second kind.

Yes, PPLNN_ENABLE_KERNEL_PROFILING macro is designed for exporting detailed timing for each op. And --enable-profiling is also used to print the kernel profiling in detail.

from ppl.nn.

Alcanderian avatar Alcanderian commented on August 16, 2024

comand: ./pplnn-build/tools/pplnn --onnx-model tests/testdata/conv.onnx --enable-profiling --warmuptimes 3

I tried this command and it worked correctly in my machine. Cound you delete the pplnn-build directory and re-run the build command ./build.sh and try the command above again?

I've tried, tests/testdata/conv.onnx still got stuck.

Occasionally i tried another mobileNetV2 model, Profiling run to the end. It seems the conv.onnx sample has something wrong

[INFO][2021-07-05 22:29:08.104][pplnn.cc:700] ppl.nn version: 513e6122dd90f619da0e550a8a3dc5e3184e5c58-dirty
[INFO][2021-07-05 22:29:08.104][pplnn.cc:127] ***** register X86Engine *****
[INFO][2021-07-05 22:29:08.116][simple_graph_partitioner.cc:107] total partition(s) of graph[torch-jit-export]: 1.
[INFO][2021-07-05 22:29:08.139][pplnn.cc:540] ----- input info -----
[INFO][2021-07-05 22:29:08.139][pplnn.cc:543] input[0]:
[INFO][2021-07-05 22:29:08.139][pplnn.cc:544]     name: input
[INFO][2021-07-05 22:29:08.139][pplnn.cc:551]     dim(s): 1 3 224 224
[INFO][2021-07-05 22:29:08.139][pplnn.cc:553]     DataType: FLOAT32
[INFO][2021-07-05 22:29:08.139][pplnn.cc:554]     DataFormat: NDARRAY
[INFO][2021-07-05 22:29:08.139][pplnn.cc:555]     NumBytesIncludePadding: 602112
[INFO][2021-07-05 22:29:08.139][pplnn.cc:556]     NumBytesExcludePadding: 602112
[INFO][2021-07-05 22:29:08.139][pplnn.cc:559] ----- output info -----
[INFO][2021-07-05 22:29:08.139][pplnn.cc:562] output[0]:
[INFO][2021-07-05 22:29:08.139][pplnn.cc:563]     name: output
[INFO][2021-07-05 22:29:08.139][pplnn.cc:570]     dim(s): 1 1000
[INFO][2021-07-05 22:29:08.139][pplnn.cc:572]     DataType: FLOAT32
[INFO][2021-07-05 22:29:08.139][pplnn.cc:573]     DataFormat: NDARRAY
[INFO][2021-07-05 22:29:08.139][pplnn.cc:574]     NumBytesIncludePadding: 4000
[INFO][2021-07-05 22:29:08.139][pplnn.cc:575]     NumBytesExcludePadding: 4000
[INFO][2021-07-05 22:29:08.139][pplnn.cc:578] ----------------------
[INFO][2021-07-05 22:29:08.139][pplnn.cc:808] Run() costs: 9.195000 ms.
[INFO][2021-07-05 22:29:08.139][pplnn.cc:816] Run ok
[INFO][2021-07-05 22:29:08.139][pplnn.cc:820] Warm up start for 3 times.
[INFO][2021-07-05 22:29:08.161][pplnn.cc:827] Warm up end.
[INFO][2021-07-05 22:29:08.161][pplnn.cc:835] Profiling start
[INFO][2021-07-05 22:29:09.164][pplnn.cc:851] Duration: 1002.473000 ms
[INFO][2021-07-05 22:29:09.164][pplnn.cc:861] Average run cost: 7.317321 ms.
[INFO][2021-07-05 22:29:09.164][pplnn.cc:864] Profiling End

I've tried simple conv on my machine. I found it will take about 30 seconds to finish the profiling because it take tooooooooooooooo little time in each run, lmao.
You will find the time is slowly growing if you print the run_dur at pplnn.cc:847, just be patient:)

from ppl.nn.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.