# Characterizing Perception Deep Learning Algorithms and Applications for Vehicular Edge Computing
## 4 Analysis and Key Insights
### Memory and Computation Load  
As discussed in Section 2, memory contention is a critical factor when latency in time or performance is essential. Figure 2 illustrates two distinct states, emphasizing the necessity of managing memory contention effectively in these scenarios. In our profiling, we identify three scenarios regarding memory resources:  
* Scenario 1: No memory resource contention. * Scenario 2: Memory resource contention typically encountered under heavy workloads. * Scenario 3: Extreme lack of memory resources. In Scenario 1, memory resources are abundant for all tasks, with no bottlenecks. In Scenario 2, however, memory resources are strained due to access contention or limited availability. Notably, temperature and system bus bottlenecks are not considered in Scenario 2, as these conditions may lead to system instability. Scenario 3 accounts for severe memory allocation constraints, from low to minimal operational limits. Figure 2: (**Left**) Single-stage perception deep learning application with and (**Right**) without memory resource contention. In Scenario 1 (Figure 2(left)), the model remains consistent with a CPU-dominated linear model, which we can express as  
\[\eta_{time}=0.077*\gamma-0.89 \tag{1}\]  
where \(\gamma=GFLOPs\), representing the computational load required by the workload. However, when applying Equation (1) to the same set of workloads under memory limitations, the model no longer holds true as depicted in Figure 2(right). Traditional optimization and scheduling methods may alleviate some issues, but they cannot fully resolve the challenges posed by memory contention. Thus, to accurately characterize the impact of memory contention across various platforms, further characterization is necessary for workloads in Scenarios 2 and 3, which encounter moderate to heavy memory contention. By modeling the behavior of the algorithms under varying resource constraints, we can profile and characterize the effects of memory contention, with Faster R-CNN denoted as \((\theta)\) and YOLO as \((\omega)\). Initially, we profile the maximum amount of RAM needed for each machine learning method, represented as \(\theta_{MAX}\) for Faster R-CNN and \(\omega_{MAX}\) for YOLO. Each ML method is tested with progressively less available RAM until task failure occurs. As shown in Figure 3, we profile the workload characteristics under Scenario 3 and observe a clear correlation with the amount of memory available. From the data collected, we can model the behaviors of the two ML workloads using Equations (2) and (3), respectively. Here, the CPU frequency is represented as \(\
u=\) CPU Power, and memory is denoted as \(\beta=\) Memory. It is important to note that while an \(R^{2}\) value of at least 0.9 is deemed acceptable, extreme cases, such as operating \(\omega\) with 100 MB or less, exhibit higher variance when predicted using this model. \[\eta_{time}^{\theta}= 0*\
u+1016*\beta^{-0.06054}-930\] \[\text{with }R^{2}=0.9041\] \[\eta_{time}^{\omega}= 0*\
u+0.2379*\beta^{-1.03}+11.38\] \[\text{with }R^{2}=0.9560 \tag{3}\]  
To ensure consistency in edge workload parameters for Scenario 3 across different platforms, we analyze the same scenario on the Jetson device, as shown in Figure 4. While the Jetson device exhibits less variance in the data, its behavior aligns closely with our previous findings. The second set of models derived for Faster R-CNN (\(\theta\)), and YOLO (\(\omega\)) is expressed in Equations (4) and (5). Figure 3: Performance of perception deep learning applications single-stage (**Left**) and two-stage (**Right**) on high-end vehicular edge devices with memory contention. \[\eta_{time}^{\theta}= 0*\
u+42.418*\beta^{-0.768} \tag{4}\] \[\text{with }R^{2}=0.9837\] \[\eta_{time}=0.077*\gamma-0.89 \tag{1}\]0 \[\eta_{time}=0.077*\gamma-0.89 \tag{1}\]1  
With the Jetson Memory model, we achieve an \(R^{2}=0.98\) for \(\theta\) and \(R^{2}=0.87\) for \(\omega\).