# An Image-Retrieval Method Based on Cross-Hardware Platform Features
## 3 Methods
### Hardware Architecture (GPU/NPU)  
The hardware architecture difference will significantly affect the quality and speed of feature extraction. In this paper, the Tesla T4 (GPU) and Atlas 300V (NPU) are selected for comparison. As shown in Figure 3, GPU architecture has been widely used in the field of artificial intelligence because of its high parallel computing capability and versatility. In GPU fields, NVIDIA GPUs are widely used in deep-learning training and inference tasks due to their outstanding performance and versatility, which promotes the rapid development of the deep-learning field. In addition, a large number of enterprises are adopting NVIDIA GPUs to deploy AI models in data centers and edge devices. The NVIDIA Tesla T4 further extends this lead, from FP32 to FP16 to INT8 and INT4, delivering breakthrough performance and flexible multi-precision capabilities. Specifically, the NVIDIA T4 is an AI inference accelerator based on the new NVIDIA Turing(tm) architecture, featuring high performance, low latency, multi-precision, and hybrid accuracy. The NVIDIA Tesla T4 GPU includes 2560 CUDA cores and 320 tensor cores, which deliver FP16 performance of up to 65 TFLOPS and INT8 inference performance of up to 130 TOPS. In addition, the NVIDIA Tesla T4 introduces a revolutionary Turing tensor core technology that uses multi-precision computation for different workloads. The NVIDIA Tesla T4 accelerates different cloud workloads, including video transcoding, deep-learning training, and inference, to deliver revolutionary performance and innovative solutions [7; 8; 57]. Turing GPUs have a CUDA Compute Capability of 7.5. An NPU is a kind of application-specific integrated circuit (ASIC), in which the processing of the network is more complex and more flexible, and generally can use software or hardware, according to the characteristics of network computing special programming, to achieve the special purpose of the network. NPUs in a chip can achieve many different functions, and are applicable to a variety of different network equipment and products. Huawei Ascend AI processor is a successful example of NPU architecture design. The Huawei Ascend AI processor is essentially a system-on-chip, which can mainly be applied to scenes related to voice, word, video, and image processing. Its main architectural components include special corresponding control units, large capacity storage units, and computing units [18]. As is shown in Figure 4, the Ascend core, based on the DaVinci architecture, consists of an instruction management unit, multi-level on-chip memory, and corresponding loading/storage units, three types of computing units, etc. Specifically, the computing unit mainly includes scalar, vector, and cube. The scalar unit is similar to the classical RISC core and is primarily responsible for the operations of the control flow and scalar calculations. The 1D vector unit is similar to the SIMD unit, which can perform most computation operations, such as format transfer, activation, normalize, CV operators (RPN, etc.). The 2D matrix unit is used to perform general matrix-matrix multiplication (GEMM), including dot product and outer product, because it can reuse intermediate data and accelerate computational efficiency. The 3D cube unit then provides a lot of computing power to perform Mat-Mul, FC, convolution, etc. The cube unit can alleviate the mismatch between limited memory bandwidth and computational throughput due to its excellent data reuse capability [18]. The Ascend core uses multi-level buffers to ensure data reuse. For example, L0 buffers are dedicated to 3D cube units. In addition, vector units are also responsible for data accuracy conversion, such as quantization and de-quantization operations between int32, fp16, and int8 [18]. Figure 3: GPU architecture [57; 58].