Skip to content

Commit dd069b1

Browse files
committed
bench: fix stride arguments
1 parent 00ef065 commit dd069b1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

docs/migration-guides/scijs/benchmark/benchmark.gemm.square_matrices.js

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ var format = require( '@stdlib/string/format' );
3434
var tryRequire = require( '@stdlib/utils/try-require' );
3535

3636
// var sgemm = require( '@stdlib/blas/base/sgemm' ).ndarray;
37-
var sgemm = require( '@stdlib/utils/noop' );
37+
var sgemm = require( '@stdlib/utils/noop' ); // FIXME: remove once `sgemm` merged
3838

3939
var pkg = require( './../package.json' ).name;
4040

@@ -94,7 +94,7 @@ function createBenchmark1( shapeA, orderA, shapeB, orderB, shapeC, orderC ) {
9494

9595
b.tic();
9696
for ( i = 0; i < b.iterations; i++ ) {
97-
sgemm( 'no-transpose', 'no-transpose', shapeA[0], shapeC[1], shapeB[0], 0.5, A, sa[0], sa[1], 0, B, sb[0], sb[1], 0, 2.0, C, sc[1], sc[0], 0 );
97+
sgemm( 'no-transpose', 'no-transpose', shapeA[0], shapeC[1], shapeB[0], 0.5, A, sa[0], sa[1], 0, B, sb[0], sb[1], 0, 2.0, C, sc[0], sc[1], 0 );
9898
if ( isnanf( C[ i%C.length ] ) ) {
9999
b.fail( 'should not return NaN' );
100100
}
@@ -203,21 +203,21 @@ function main() {
203203
'row-major'
204204
];
205205
f = createBenchmark1( shapes[0], orders[0], shapes[1], orders[1], shapes[2], orders[2] );
206-
bench( format( '%s::stdlib:blas/base/sgemm:orders=(%s),size=%d,shapes={(%s),(%s),(%s)}', pkg, orders.join( ',' ), numel( shapes[2] ), shapes[0].join( ',' ), shapes[1].join( ',' ), shapes[2].join( ',' ) ), f );
206+
bench( format( '%s::stdlib:blas/base/sgemm:dtype=%s,orders=(%s),size=%d,shapes={(%s),(%s),(%s)}', OPTS.dtype, pkg, orders.join( ',' ), numel( shapes[2] ), shapes[0].join( ',' ), shapes[1].join( ',' ), shapes[2].join( ',' ) ), f );
207207

208208
f = createBenchmark2( shapes[0], orders[0], shapes[1], orders[1], shapes[2], orders[2] );
209-
bench( format( '%s::scijs:ndarray-gemm:orders=(%s),size=%d,shapes={(%s),(%s),(%s)}', pkg, orders.join( ',' ), numel( shapes[2] ), shapes[0].join( ',' ), shapes[1].join( ',' ), shapes[2].join( ',' ) ), opts, f );
209+
bench( format( '%s::scijs:ndarray-gemm:dtype=%s,orders=(%s),size=%d,shapes={(%s),(%s),(%s)}', OPTS.dtype, pkg, orders.join( ',' ), numel( shapes[2] ), shapes[0].join( ',' ), shapes[1].join( ',' ), shapes[2].join( ',' ) ), opts, f );
210210

211211
orders = [
212212
'row-major',
213213
'column-major',
214214
'row-major'
215215
];
216216
f = createBenchmark1( shapes[0], orders[0], shapes[1], orders[1], shapes[2], orders[2] );
217-
bench( format( '%s::stdlib:blas/base/sgemm:orders=(%s),size=%d,shapes={(%s),(%s),(%s)}', pkg, orders.join( ',' ), numel( shapes[2] ), shapes[0].join( ',' ), shapes[1].join( ',' ), shapes[2].join( ',' ) ), f );
217+
bench( format( '%s::stdlib:blas/base/sgemm:dtype=%s,orders=(%s),size=%d,shapes={(%s),(%s),(%s)}', OPTS.dtype, pkg, orders.join( ',' ), numel( shapes[2] ), shapes[0].join( ',' ), shapes[1].join( ',' ), shapes[2].join( ',' ) ), f );
218218

219219
f = createBenchmark2( shapes[0], orders[0], shapes[1], orders[1], shapes[2], orders[2] );
220-
bench( format( '%s::scijs:ndarray-gemm:orders=(%s),size=%d,shapes={(%s),(%s),(%s)}', pkg, orders.join( ',' ), numel( shapes[2] ), shapes[0].join( ',' ), shapes[1].join( ',' ), shapes[2].join( ',' ) ), opts, f );
220+
bench( format( '%s::scijs:ndarray-gemm:dtype=%s,orders=(%s),size=%d,shapes={(%s),(%s),(%s)}', OPTS.dtype, pkg, orders.join( ',' ), numel( shapes[2] ), shapes[0].join( ',' ), shapes[1].join( ',' ), shapes[2].join( ',' ) ), opts, f );
221221
}
222222
}
223223

0 commit comments

Comments
 (0)