msluszniak commited on
Commit
264226f
·
verified ·
1 Parent(s): d5dc58a

Core ML: emit a (1,520,520) int32 index map instead of (1,21,520,520) logits

Browse files

The argmax now runs inside the graph, built from reduce_max and elementwise ops so it stays on the ANE. 1.05x to 1.63x faster and 7 to 48 percent lower peak memory on an iPhone 16. XNNPACK variants are unchanged.

Files changed (1) hide show
  1. coreml/config.json +6 -4
coreml/config.json CHANGED
@@ -11,6 +11,8 @@
11
  {
12
  "file": "fcn_resnet50_coreml_fp16.pte",
13
  "precision": "fp16",
 
 
14
  "size": "resnet50",
15
  "methods": {
16
  "forward": {
@@ -29,11 +31,10 @@
29
  {
30
  "shape": [
31
  1,
32
- 21,
33
  520,
34
  520
35
  ],
36
- "dtype": "float32"
37
  }
38
  ]
39
  }
@@ -42,6 +43,8 @@
42
  {
43
  "file": "fcn_resnet101_coreml_fp16.pte",
44
  "precision": "fp16",
 
 
45
  "size": "resnet101",
46
  "methods": {
47
  "forward": {
@@ -60,11 +63,10 @@
60
  {
61
  "shape": [
62
  1,
63
- 21,
64
  520,
65
  520
66
  ],
67
- "dtype": "float32"
68
  }
69
  ]
70
  }
 
11
  {
12
  "file": "fcn_resnet50_coreml_fp16.pte",
13
  "precision": "fp16",
14
+ "quantized": false,
15
+ "default": true,
16
  "size": "resnet50",
17
  "methods": {
18
  "forward": {
 
31
  {
32
  "shape": [
33
  1,
 
34
  520,
35
  520
36
  ],
37
+ "dtype": "int32"
38
  }
39
  ]
40
  }
 
43
  {
44
  "file": "fcn_resnet101_coreml_fp16.pte",
45
  "precision": "fp16",
46
+ "quantized": false,
47
+ "default": false,
48
  "size": "resnet101",
49
  "methods": {
50
  "forward": {
 
63
  {
64
  "shape": [
65
  1,
 
66
  520,
67
  520
68
  ],
69
+ "dtype": "int32"
70
  }
71
  ]
72
  }