The embodiment of the invention provides a
large model compiling optimization method and
system based on in-memory computing equipment. According to the method, a high-dimensional
tensor of a
large model is split into sub-tensors adaptive to a storage array, waste of storage resources caused by mismatching of data sizes is avoided, weight data with the
reuse rate larger than a preset threshold value is preloaded to an equipment
storage area, and repeated carrying of the weight data can be avoided; on the basis of a preset operator instruction matching table, a mapping relation between a
large model operator and an in-memory calculation instruction is constructed, and it is ensured that equipment instruction resources can be efficiently called by the large model operator; then, based on the sub-
tensor data size and the mapping relation between operators and instructions, the target calculation task is split into sub-tasks and distributed to a target calculation unit, and accurate matching of calculation unit resources and task types is achieved; and finally, generating an equipment
executable instruction stream according to an allocation result to ensure that storage, instructions and computing unit resources of the computing equipment in the optimized memory are all adaptive to large model computing requirements, so that the
utilization rate of the equipment resources can be improved.