(ColorfulCakeChen) CNN Channel Shuffle

JavaScript performance comparison

Test case created by ColorfulCakeChen

Preparation code


      
      <script>
Benchmark.prototype.setup = function() {
  // For loading library.
  let pathTensorflow = "https://cdn.jsdelivr.net/npm/@tensorflow/tfjs@2.0.0";
  let pathTestCase = "https://cdn.jsdelivr.net/gh/ColorfulCakeChen/query-submit-canvas@ee9b35288903b065010871bc1ef1853bfc7220e1/CNN/jsPerf/jsPerf_CNNChannelShuffle.js";
  
  class ScriptLoader {
    /**
     * @param {string}  url      The URL of the script to be loaded.
     * @param {boolean} isModule If true, the script will be loaded as javascript module.
     * @return A promise. It resolves when the script is loaded.
     */
    static createPromise(url, isModule) {
      return new Promise((resolve, reject) => {
        let attributes = { src:url, onload:e=>resolve(e), onerror:e=>reject(e) };
        if (isModule)
          attributes.type = "module";
  
        document.head.appendChild(Object.assign(document.createElement("script"), 
    attributes));
      });
    }
  }
  
  var libraryLoaderPromise;
  
  if ( globalThis.tf ) {
    //console.log("Library already loaded.");
    libraryLoaderPromise = Promise.resolve();
  } else {
    console.log("library loading...");
    libraryLoaderPromise = ScriptLoader.createPromise(pathTensorflow).then( e => {
      return ScriptLoader.createPromise(pathTestCase, true);
    }).then( e => {
      console.log("library loaded.");
  
      tf.ready().then( e => {
        console.log("library ready.");
        // For pre-compile tensorflow.js GPU code. (and Test correctness.)
        console.log("library compiling...");
        testSet_110x110x24_g3.testResultSame();
        console.log("library compiling done.");
      });
    });
  }

};
</script>

Test runner

Warning! For accurate results, please disable Firebug before running the tests. (Why?)

Java applet disabled.

Testing in CCBot 2.0.0 / Other 0.0.0
Test Ops/sec
dummy (For waiting library loaded)
// async test
libraryLoaderPromise.then( () => {
  // Library loaded. Wait (to slow down testing) and finish.
  setTimeout( () => { deferred.resolve(); }, 500 );
});
pending…
ConcatReshapeTransposeReshapeSplit (8)
testSet_110x110x24_g8.test_ConcatReshapeTransposeReshapeSplit();
pending…
ConcatGatherUnsorted (8)
testSet_110x110x24_g8.test_ConcatGatherUnsorted();
pending…
SplitConcatSortedShared (8)
testSet_110x110x24_g8.test_SplitConcatSortedShared();
pending…
ConcatPointwiseConv (8)
testSet_110x110x24_g8.test_ConcatPointwiseConv();
pending…
ConcatReshapeTransposeReshapeSplit (4)
testSet_110x110x24_g4.test_ConcatReshapeTransposeReshapeSplit();
pending…
ConcatGatherUnsorted (4)
testSet_110x110x24_g4.test_ConcatGatherUnsorted();
pending…
SplitConcatSortedShared (4)
testSet_110x110x24_g4.test_SplitConcatSortedShared();
pending…
ConcatPointwiseConv (4)
testSet_110x110x24_g4.test_ConcatPointwiseConv();
pending…
ConcatReshapeTransposeReshapeSplit (2)
testSet_110x110x24_g2.test_ConcatReshapeTransposeReshapeSplit();
pending…
ConcatGatherUnsorted (2)
testSet_110x110x24_g2.test_ConcatGatherUnsorted();
pending…
SplitConcatSortedShared (2)
testSet_110x110x24_g2.test_SplitConcatSortedShared();
pending…
ConcatPointwiseConv (2)
testSet_110x110x24_g2.test_ConcatPointwiseConv();
pending…
ConcatReshapeTransposeReshapeSplit (1)
testSet_110x110x24_g1.test_ConcatReshapeTransposeReshapeSplit();
pending…
ConcatGatherUnsorted (1)
testSet_110x110x24_g1.test_ConcatGatherUnsorted();
pending…
SplitConcatSortedShared (1)
testSet_110x110x24_g1.test_SplitConcatSortedShared();
pending…
ConcatPointwiseConv (1)
testSet_110x110x24_g1.test_ConcatPointwiseConv();
pending…

You can edit these tests or add even more tests to this page by appending /edit to the URL.

0 Comments