Figure 1.
CIM computing architecture.
Figure 1.
CIM computing architecture.
Figure 2.
Example of current deviation.
Figure 2.
Example of current deviation.
Figure 3.
Example of R ratio and IHRS vs. ILRS.
Figure 3.
Example of R ratio and IHRS vs. ILRS.
Figure 5.
Example of AWL effect on the calculation cycle and calculation error.
Figure 5.
Example of AWL effect on the calculation cycle and calculation error.
Figure 6.
Impact of the AWL on accuracy under R ratio 10.
Figure 6.
Impact of the AWL on accuracy under R ratio 10.
Figure 7.
Accuracy of adjusting the AWL in a single layer with R ratio 10.
Figure 7.
Accuracy of adjusting the AWL in a single layer with R ratio 10.
Figure 8.
The proportion of 0 in the weights in Cifar-10.
Figure 8.
The proportion of 0 in the weights in Cifar-10.
Figure 9.
The proportion of 0 in the weights in VGG-8.
Figure 9.
The proportion of 0 in the weights in VGG-8.
Figure 10.
Architecture of inference accuracy predictor.
Figure 10.
Architecture of inference accuracy predictor.
Figure 11.
Derivation of weight quantization.
Figure 11.
Derivation of weight quantization.
Figure 12.
Weight distribution of Cifar-10.
Figure 12.
Weight distribution of Cifar-10.
Figure 13.
Convolutional layer and fully connected layer operation process.
Figure 13.
Convolutional layer and fully connected layer operation process.
Figure 14.
Accuracy changing under different Min AWL (R ratio = 25).
Figure 14.
Accuracy changing under different Min AWL (R ratio = 25).
Figure 15.
Accuracy changing under different Min AWL (R ratio = 35).
Figure 15.
Accuracy changing under different Min AWL (R ratio = 35).
Table 1.
Risk factors and their impact value on risk index.
Table 1.
Risk factors and their impact value on risk index.
| Risk Factor |
Impact Value |
| R ratio <= 10 |
+1 |
| Convolution Layer |
+1 |
| Matrix Row (R) >= 256 |
+
|
| Ratio of 0 in MSB >= 55% |
+1 |
| R ratio >= 20 |
-1 |
( FC(Dense) Layer || Next Layer = FC Layer ) && R ratio > 10 |
-1 |
Table 2.
Risk index and corresponding AWL value.
Table 2.
Risk index and corresponding AWL value.
| Risk Index |
AWL |
| >3 (ratio <= 10) |
8 |
| >= 3 |
16 |
| 2 |
32 |
| 1 |
64 |
| <= 0 |
128 |
Table 3.
Experiment setup.
Table 3.
Experiment setup.
| Simulator |
RRAM Accuracy Predictor |
| CNN |
Cifar-10, VGG-8 |
| CIM array size |
512 * 512 |
| RRAM cell |
1 bit/pre cell |
| Resistance ON/OFF ratio |
10, 15, 20 |
Table 4.
Cifar-10 architecture.
Table 4.
Cifar-10 architecture.
| |
Input |
Channel |
Kernel |
Depth |
Matrix Row |
Matrix Col. |
| Layer 1 |
32 |
3 |
3 |
32 |
27 |
32 |
| Layer 2 |
15 |
32 |
5 |
64 |
800 |
64 |
| Layer 3 |
3 |
64 |
3 |
64 |
576 |
64 |
| Layer 4 |
1 |
64 |
1 |
64 |
64 |
64 |
| Layer 5 |
1 |
64 |
1 |
10 |
64 |
10 |
Table 5.
Cifar-10 layer-wise risk factor.
Table 5.
Cifar-10 layer-wise risk factor.
| |
Layer Type |
Matrix Row |
Ratio of 0 in MSB |
| Layer 1 |
Conv |
27 |
51.39 % |
| Layer 2 |
Conv |
800 |
57 % |
| Layer 3 |
Conv |
576 |
56.18 % |
| Layer 4 |
Dense |
64 |
52.59 % |
| Layer 5 |
Dense |
64 |
53.28 % |
Table 6.
Cifar-10 layer-wise risk index and AWL.
Table 6.
Cifar-10 layer-wise risk index and AWL.
| |
Risk Index |
Active WL Number |
| R Ratio |
10 |
15 |
20 |
10 |
15 |
20 |
| Layer 1 |
2 |
1 |
0 |
32 |
32 |
32 |
| Layer 2 |
5 |
4 |
3 |
8 |
16 |
16 |
| Layer 3 |
5 |
3 |
2 |
8 |
16 |
32 |
| Layer 4 |
1 |
-1 |
-2 |
64 |
64 |
64 |
| Layer 5 |
1 |
-1 |
-2 |
64 |
64 |
64 |
Table 7.
VGG-8 architecture.
Table 7.
VGG-8 architecture.
| |
Input |
Channel |
Kernel |
Depth |
Matrix Row |
Matrix Col. |
| Layer 1 |
32 |
3 |
3 |
32 |
27 |
32 |
| Layer 2 |
32 |
32 |
3 |
32 |
288 |
32 |
| Layer 3 |
16 |
32 |
3 |
64 |
288 |
64 |
| Layer 4 |
16 |
64 |
3 |
64 |
576 |
64 |
| Layer 5 |
8 |
64 |
3 |
128 |
576 |
128 |
| Layer 6 |
8 |
128 |
3 |
128 |
1152 |
128 |
| Layer 7 |
1 |
2048 |
1 |
128 |
2048 |
128 |
| Layer 8 |
1 |
128 |
1 |
10 |
128 |
10 |
Table 8.
VGG-8 layer-wise risk factor.
Table 8.
VGG-8 layer-wise risk factor.
| |
Layer Type |
Matrix Row |
Ratio of 0 in MSB |
| Layer 1 |
Conv |
27 |
52.78 % |
| Layer 2 |
Conv |
288 |
54.83 % |
| Layer 3 |
Conv |
288 |
51.54 % |
| Layer 4 |
Conv |
576 |
56.31 % |
| Layer 5 |
Conv |
576 |
53.25 % |
| Layer 6 |
Conv |
1152 |
56.76 % |
| Layer 7 |
Dense |
2048 |
56.02 % |
| Layer 8 |
Dense |
128 |
48.67 % |
Table 9.
VGG-8 layer-wise risk index and AWL.
Table 9.
VGG-8 layer-wise risk index and AWL.
| |
Risk Index |
Active WL Number |
| R Ratio |
10 |
15 |
20 |
10 |
15 |
20 |
| Layer 1 |
2 |
1 |
0 |
32 |
32 |
32 |
| Layer 2 |
3 |
2 |
1 |
16 |
32 |
64 |
| Layer 3 |
3 |
2 |
1 |
16 |
32 |
64 |
| Layer 4 |
5 |
4 |
3 |
8 |
16 |
16 |
| Layer 5 |
4 |
3 |
2 |
8 |
16 |
32 |
| Layer 6 |
6 |
4 |
3 |
8 |
16 |
16 |
| Layer 7 |
6 |
4 |
3 |
8 |
16 |
16 |
| Layer 8 |
1 |
-1 |
-2 |
64 |
128 |
128 |
Table 10.
Accuracy of Cifar-10 using layer-wise AWL.
Table 10.
Accuracy of Cifar-10 using layer-wise AWL.
| |
Active WL Number |
| R Ratio |
10 |
15 |
20 |
| Layer 1 |
32 |
32 |
32 |
| Layer 2 |
8 |
16 |
16 |
| Layer 3 |
8 |
16 |
32 |
| Layer 4 |
64 |
64 |
64 |
| Layer 5 |
64 |
64 |
64 |
| ACC |
55.65 % |
57.2 % |
58.35 % |
| Loss |
-3.35 % |
-1.8 % |
-0.65 % |
Table 11.
Layer-wise computation cycle of Cifar-10.
Table 11.
Layer-wise computation cycle of Cifar-10.
| |
Baseline |
R Ratio = 10 |
R Ratio = 15 |
R Ratio = 20 |
| Layer 1 |
4 |
1 |
1 |
1 |
| Layer 2 |
100 |
100 |
50 |
50 |
| Layer 3 |
72 |
72 |
36 |
18 |
| Layer 4 |
8 |
1 |
1 |
1 |
| Layer 5 |
8 |
1 |
1 |
1 |
| Total |
192 |
175 |
89 |
71 |
| Benefit |
X |
-9 % |
-54 % |
-63 % |
Table 12.
Accuracy of VGG-8 using layer-wise AWL.
Table 12.
Accuracy of VGG-8 using layer-wise AWL.
| |
Active WL Number |
| R Ratio |
10 |
15 |
20 |
| Layer 1 |
32 |
32 |
32 |
| Layer 2 |
16 |
32 |
64 |
| Layer 3 |
16 |
32 |
64 |
| Layer 4 |
8 |
16 |
16 |
| Layer 5 |
8 |
16 |
32 |
| Layer 6 |
8 |
16 |
16 |
| Layer 7 |
8 |
16 |
16 |
| Layer 8 |
64 |
128 |
128 |
| ACC |
62 % |
63.9 % |
64.79 % |
| Loss |
-2.9 % |
-1 % |
-0.11 % |
Table 13.
Layer-wise computation cycle of VGG-8.
Table 13.
Layer-wise computation cycle of VGG-8.
| |
Baseline |
R Ratio = 10 |
R Ratio = 15 |
R Ratio = 20 |
| Layer 1 |
4 |
1 |
1 |
1 |
| Layer 2 |
36 |
18 |
9 |
5 |
| Layer 3 |
36 |
18 |
9 |
5 |
| Layer 4 |
72 |
72 |
36 |
36 |
| Layer 5 |
144 |
144 |
72 |
36 |
| Layer 6 |
288 |
288 |
144 |
144 |
| Layer 7 |
512 |
512 |
256 |
256 |
| Layer 8 |
16 |
2 |
1 |
1 |
| Total |
1108 |
1055 |
528 |
484 |
| Benefit |
X |
-5 % |
-52 % |
-56 % |
Table 14.
Cifar-10 layer-wise risk index (large R ratio).
Table 14.
Cifar-10 layer-wise risk index (large R ratio).
| |
Risk Index |
| R Ratio |
25 |
35 |
| Layer 1 |
0 |
0 |
| Layer 2 |
3 |
3 |
| Layer 3 |
2 |
2 |
| Layer 4 |
-2 |
-2 |
| Layer 5 |
-2 |
-2 |
Table 15.
Risk index and different min. AWL mapping table (large R ratio).
Table 15.
Risk index and different min. AWL mapping table (large R ratio).
| |
AWL |
| Risk Index |
Min. AWL = 16 |
Min. AWL = 32 |
Min. AWL = 64 |
Min. AWL = 128 |
Min. AWL = 256 |
| >= 3 |
16 |
32 |
64 |
128 |
256 |
| 2 |
32 |
64 |
128 |
256 |
512 |
| 1 |
64 |
128 |
256 |
512 |
512 |
| <= 0 |
128 |
256 |
512 |
512 |
512 |
Table 16.
Accuracy and cycle benefit of Cifar-10 under different Min AWL (R ratio = 25).
Table 16.
Accuracy and cycle benefit of Cifar-10 under different Min AWL (R ratio = 25).
| |
Active WL Number |
| Min AWL |
16 |
32 |
64 |
128 |
256 |
| Layer 1 |
32 |
32 |
32 |
32 |
32 |
| Layer 2 |
16 |
32 |
64 |
128 |
256 |
| Layer 3 |
32 |
64 |
128 |
256 |
512 |
| Layer 4 |
64 |
64 |
64 |
64 |
64 |
| Layer 5 |
64 |
64 |
64 |
64 |
64 |
| ACC (%) |
59 |
59 |
58.9 |
59.65 |
21.14 |
| Loss (%) |
-0 |
-0 |
-0.1 |
+0.65 |
- 37.86 |
| Cycle benefit (%) |
-71 |
-81 |
-89 |
-93 |
-95 |
Table 17.
Accuracy and cycle benefit of Cifar-10 under different Min AWL (R ratio = 35).
Table 17.
Accuracy and cycle benefit of Cifar-10 under different Min AWL (R ratio = 35).
| |
Active WL Number |
| Min AWL |
16 |
32 |
64 |
128 |
256 |
| Layer 1 |
32 |
32 |
32 |
32 |
32 |
| Layer 2 |
16 |
32 |
64 |
128 |
256 |
| Layer 3 |
32 |
64 |
128 |
256 |
512 |
| Layer 4 |
64 |
64 |
64 |
64 |
64 |
| Layer 5 |
64 |
64 |
64 |
64 |
64 |
| ACC (%) |
59 |
59 |
59 |
59.15 |
51.83 |
| Loss (%) |
-0 |
-0 |
-0 |
+0.15 |
-7.17 |
| Cycle benefit (%) |
-71 |
-81 |
-89 |
-93 |
-95 |
Table 18.
Accuracy of Cifar-10 using layer-wise AWL (Min AWL = 32).
Table 18.
Accuracy of Cifar-10 using layer-wise AWL (Min AWL = 32).
| |
Active WL Number |
| R Ratio |
10 |
15 |
20 |
| Layer 1 |
32 |
32 |
32 |
| Layer 2 |
32 |
32 |
32 |
| Layer 3 |
32 |
32 |
64 |
| Layer 4 |
64 |
64 |
64 |
| Layer 5 |
64 |
64 |
64 |
| ACC |
49.9 % |
57.35 % |
58.35 % |
| Loss |
-9.1 % |
-1.65 % |
-0.65 % |
Table 19.
Accuracy of Cifar-10 using layer-wise AWL (Min AWL = 64).
Table 19.
Accuracy of Cifar-10 using layer-wise AWL (Min AWL = 64).
| |
Active WL Number |
| R Ratio |
10 |
15 |
20 |
| Layer 1 |
32 |
32 |
32 |
| Layer 2 |
64 |
64 |
64 |
| Layer 3 |
64 |
64 |
128 |
| Layer 4 |
64 |
64 |
64 |
| Layer 5 |
64 |
64 |
64 |
| ACC |
9.85 % |
56.05 % |
59.6 % |
| Loss |
-49.15 % |
-2.95 % |
+0.6 % |