Skip to content

Instantly share code, notes, and snippets.

diff --git a/integration_tests/benchmarks/benchmark_test.ts b/integration_tests/benchmarks/benchmark_test.ts
index 8148ea22..d90a4ca3 100644
--- a/integration_tests/benchmarks/benchmark_test.ts
+++ b/integration_tests/benchmarks/benchmark_test.ts
@@ -18,6 +18,7 @@
import {ConvGPUBenchmark, RegularConvParams} from './conv_benchmarks';
import {MatmulGPUBenchmark} from './matmul_benchmarks';
import {MobileNetV1GPUBenchmark} from './mobilenet_benchmarks';
+import {TransposeGPUBenchmark} from './transpose_benchmarks';
import * as test_util from './test_util';
@astojilj
astojilj / packedconv2dbenchmark.patch
Created January 29, 2019 10:00
benchmark packed conv2D by matmul + expensive packed reshape
diff --git a/integration_tests/benchmarks/benchmark_test.ts b/integration_tests/benchmarks/benchmark_test.ts
index 8148ea22..e883b11c 100644
--- a/integration_tests/benchmarks/benchmark_test.ts
+++ b/integration_tests/benchmarks/benchmark_test.ts
@@ -40,9 +40,9 @@ describe('benchmarks', () => {
});
it('conv2d', async done => {
- const sizes = [10, 100, 227];
+ const sizes = [10, 227, 513];
diff --git a/integration_tests/benchmarks/matmul_benchmarks.ts b/integration_tests/benchmarks/matmul_benchmarks.ts
index 8f67ed9..5e242fb 100644
--- a/integration_tests/benchmarks/matmul_benchmarks.ts
+++ b/integration_tests/benchmarks/matmul_benchmarks.ts
@@ -43,8 +43,8 @@ export class MatmulGPUBenchmark implements BenchmarkTest {
async run(size: number): Promise<number> {
tf.setBackend('webgl');
- const a: tf.Tensor2D = tf.randomNormal([size, size]);
- const b: tf.Tensor2D = tf.randomNormal([size, size]);
diff --git a/integration_tests/benchmarks/benchmark_test.ts b/integration_tests/benchmarks/benchmark_test.ts
index 8148ea2..72b74f7 100644
--- a/integration_tests/benchmarks/benchmark_test.ts
+++ b/integration_tests/benchmarks/benchmark_test.ts
@@ -15,10 +15,15 @@
* =============================================================================
*/
+import * as tf from '@tensorflow/tfjs-core';
+
diff --git a/integration_tests/benchmarks/benchmark_test.ts b/integration_tests/benchmarks/benchmark_test.ts
index 8148ea22..7a38c6da 100644
--- a/integration_tests/benchmarks/benchmark_test.ts
+++ b/integration_tests/benchmarks/benchmark_test.ts
@@ -16,8 +16,8 @@
*/
import {ConvGPUBenchmark, RegularConvParams} from './conv_benchmarks';
-import {MatmulGPUBenchmark} from './matmul_benchmarks';
import {MobileNetV1GPUBenchmark} from './mobilenet_benchmarks';
@astojilj
astojilj / 14362.patch
Last active May 15, 2019 10:07
14362.patch
diff --git a/platform/ios/app/MBXViewController.m b/platform/ios/app/MBXViewController.m
index 630fefde2..b6333cc33 100644
--- a/platform/ios/app/MBXViewController.m
+++ b/platform/ios/app/MBXViewController.m
@@ -509,7 +509,16 @@ - (void)performActionForSettingAtIndexPath:(NSIndexPath *)indexPath
switch (indexPath.row)
{
case MBXSettingsDebugToolsResetPosition:
- [self.mapView resetPosition];
+ // [self.mapView resetPosition];
diff --git a/src/mbgl/renderer/renderer_impl.cpp b/src/mbgl/renderer/renderer_impl.cpp
index 76c45aef7..a45c14d45 100644
--- a/src/mbgl/renderer/renderer_impl.cpp
+++ b/src/mbgl/renderer/renderer_impl.cpp
@@ -31,6 +31,8 @@
#include <mbgl/util/string.hpp>
#include <mbgl/util/logging.hpp>
+#import <QuartzCore/QuartzCore.h>
+
@astojilj
astojilj / measure-relinking.patch
Created May 20, 2019 06:01
measure relinking patch and measured results
diff --git a/src/mbgl/gl/program.hpp b/src/mbgl/gl/program.hpp
index 3757c442d..9d4eb7c24 100644
--- a/src/mbgl/gl/program.hpp
+++ b/src/mbgl/gl/program.hpp
@@ -23,6 +23,8 @@
#include <string>
+#import <QuartzCore/QuartzCore.h>
+
@astojilj
astojilj / dem-measure.patch
Created August 27, 2019 12:30
new DEMData and getImageData measurement patch
diff --git a/src/source/raster_dem_tile_source.js b/src/source/raster_dem_tile_source.js
index 1937a103d..e7c6cafc2 100644
--- a/src/source/raster_dem_tile_source.js
+++ b/src/source/raster_dem_tile_source.js
@@ -55,7 +55,10 @@ class RasterDEMTileSource extends RasterTileSource implements Source {
delete (img: any).cacheControl;
delete (img: any).expires;
+ const t = performance.now();
const rawImageData = browser.getImageData(img);
@astojilj
astojilj / depth-development-support.patch
Created April 15, 2020 14:28
depth-development-support.patch
diff --git a/src/render/painter.js b/src/render/painter.js
index 55fabcf62..4cb3fdeb1 100644
--- a/src/render/painter.js
+++ b/src/render/painter.js
@@ -645,7 +645,7 @@ class Painter {
const key = `${name}${programConfiguration ? programConfiguration.cacheKey : ''}${this._showOverdrawInspector ? '/overdraw' : ''}
${terrain ? '/terrain' : ''}${rtt ? '/rtt' : ''}`;
if (!this.cache[key]) {
- this.cache[key] = new Program(this.context, shaders[name], programConfiguration, programUniforms[name], this._showOverdrawInspector, terrain, rtt);
+ this.cache[key] = new Program(this.context, shaders[name], programConfiguration, programUniforms[name], this._showOverdrawInspector, terrain, rtt, name === 'terrainRaster');