RU2851317C1 - Computer system for executing program code - Google Patents
Computer system for executing program codeInfo
- Publication number
- RU2851317C1 RU2851317C1 RU2024136225A RU2024136225A RU2851317C1 RU 2851317 C1 RU2851317 C1 RU 2851317C1 RU 2024136225 A RU2024136225 A RU 2024136225A RU 2024136225 A RU2024136225 A RU 2024136225A RU 2851317 C1 RU2851317 C1 RU 2851317C1
- Authority
- RU
- Russia
- Prior art keywords
- program code
- memory
- values
- function
- data
- Prior art date
Links
Abstract
Description
ОБЛАСТЬ ТЕХНИКИAREA OF TECHNOLOGY
[1] Заявленное техническое решение в общем относится к области вычислительной техники, а в частности к способу и системе для выполнения программного кода.[1] The claimed technical solution generally relates to the field of computing technology, and in particular to a method and system for executing program code.
УРОВЕНЬ ТЕХНИКИLEVEL OF TECHNOLOGY
[2] Современная вычислительная парадигма базируется на парадигме машины Тьюринга и архитектуре фон Неймана. Множество исследований показали, что широко используемая вычислительная парадигма достигла своих пределов совершенствования и обладает большим количеством недостатков, не позволяющих существенно увеличить производительность вычислений. В качестве таких ключевых недостатков можно упомянуть cache coherence problem (проблема консистентности состояния данных в основной памяти и кешах центрального процессора), memory wall problem (проблема опережения производительности вычислительного ядра процессора пропускной способности шины взаимодействия с памятью (DRAM)), data moving problem (проблема копирования или обмена данными между персистентной памятью, основной памятью (DRAM) системы и кешами процессора), power consumption problem (проблема избыточного потребления энергии), throughput bottleneck (проблема ограниченной пропускной способности интерфейсов взаимодействия), Big Data problem (или проблема обработки больших данных).[2] The modern computing paradigm is based on the Turing machine paradigm and the von Neumann architecture. Numerous studies have shown that the widely used computing paradigm has reached its limits of improvement and has a large number of shortcomings that prevent a significant increase in computing performance. Among such key shortcomings are the cache coherence problem (the problem of the consistency of the data state in the main memory and caches of the central processor), the memory wall problem (the problem of the performance of the processor core outpacing the bandwidth of the memory bus (DRAM)), the data moving problem (the problem of copying or exchanging data between persistent memory, the main memory (DRAM) of the system and the processor caches), the power consumption problem (the problem of excessive energy consumption), the throughput bottleneck (the problem of limited bandwidth of interaction interfaces), and the Big Data problem (or the problem of processing big data).
[3] Современная вычислительная парадигма является алгоритмо-ориентированной и задействует несколько типов памяти (регистры CPU, DRAM, персистентная память). Исполнимый код и пользовательские данные хранятся в персистентной памяти, которая может быть представлена HDD/SSD или другими технологиями, или устройствами персистентного хранения данных. Однако, ядро процессора не способно напрямую обращаться и работать с данными в персистентной памяти, поскольку этот тип памяти не является байт-адресуемым (за исключением некоторых типов памяти, например, NOR флеш или типов памяти, поддерживающих XiP (eXecute-in-Place) механизм). Поэтому любые данные (а также исполнительный код) прежде всего должны быть скопированы в DRAM, а в случае их модификации быть сохранены обратно в персистентную память. [3] The modern computing paradigm is algorithm-oriented and utilizes multiple memory types (CPU registers, DRAM, persistent memory). Executable code and user data are stored in persistent memory, which can be represented by HDD/SSD or other persistent storage technologies or devices. However, the processor core is not capable of directly accessing and working with data in persistent memory, since this type of memory is not byte-addressable (with the exception of certain memory types, such as NOR flash or memory types that support the XiP (eXecute-in-Place) mechanism). Therefore, any data (as well as the executable code) must first be copied to DRAM and, if modified, saved back to persistent memory.
[4] Такой подход был достаточно эффективен в момент создания парадигмы, но в настоящее время такой подход вносит существенные накладные расходы (или понижение производительности вычислений) в окружении быстрой персистентной памяти и современных многоядерных процессоров. Более того, емкость (или объемы хранимых данных) современных HDD/SSD на порядки больше чем общий размер DRAM в одном экземпляре вычислительной системы, объемы обрабатываемых данных экспоненциально растут, что приводит к большим объемам обмена данными между персистентной памятью и DRAM, в результате это приводит к деградации производительности обработки данных в многопоточном окружении, исполняемом на многоядерных процессорах. [4] This approach was quite effective when the paradigm was first developed, but today it introduces significant overhead (or reduced computational performance) in the environment of fast persistent memory and modern multi-core processors. Furthermore, the capacity (or volume of stored data) of modern HDDs/SSDs is orders of magnitude greater than the total DRAM size in a single instance of a computing system; the volume of processed data grows exponentially, leading to large volumes of data exchange between persistent memory and DRAM, ultimately degrading data processing performance in a multi-threaded environment running on multi-core processors.
[5] Более того, DRAM гораздо медленнее чем ядро процессора, поэтому исполнимый код и обрабатываемые данные приходится копировать в L1/L2/L3 кеш процессора для непосредственного исполнения и обработки. В условиях многопоточного окружения процессору приходится переключать контекст между задачами, что приводит к деградации производительности исполнения. [5] Moreover, DRAM is much slower than the processor core, so executable code and processed data must be copied to the processor's L1/L2/L3 cache for immediate execution and processing. In a multithreaded environment, the processor must context switch between tasks, which leads to performance degradation.
[6] Современные процессоры являются многоядерными и у каждого ядра есть свой кеш, а также кеш разделяемый несколькими ядрами процессора. Если какие-либо данные в кеше данных определенного ядра были модифицированы, то приходится использовать специальный cache coherence protocol с целью синхронизировать состояние данных в DRAM и кешах конкретных ядер процессора. Что в итоге приводит к существенной деградации производительности для большинства современных типов алгоритмов и вычислительных нагрузок на компьютерную систему.[6] Modern processors are multi-core, and each core has its own cache, as well as a shared cache across multiple processor cores. If any data in a specific core's data cache is modified, a special cache coherence protocol must be used to synchronize the state of the data in DRAM and the caches of specific processor cores. This ultimately leads to significant performance degradation for most modern algorithms and computational workloads on a computer system.
[7] Современная вычислительная парадигма результируется в существенном потреблении энергии в силу большого выделения энергии/тепла ядрами процессора, работающих на высоких частотах. Более того, данные и исполнимый код хранятся в DRAM памяти, которая расходует энергию на периодическую операцию обновления хранимых данных (чтение и немедленная запись без модификации данных), необходимую для хранения данных. Надо также заметить, что исполнение любого приложения представляет собой многократное повторение исполнения функций, из которых состоит приложение. То есть, приложения исполняются на миллионах процессоров и это означает что одна и та же логика функции исполняется многократно, расходуя энергию на исполнение этой функции. Можно сказать, что исключение расчетов одной и той же логики функции многократно способно существенно сократить расход энергии в компьютерных системах. А сокращение расхода энергии может существенно продлевать срок службы аккумулятора сотового телефона, к примеру.[7] The modern computing paradigm results in significant energy consumption due to the large amount of energy/heat generated by processor cores operating at high frequencies. Furthermore, data and executable code are stored in DRAM memory, which expends energy on the periodic update operation of stored data (reading and immediately writing without modifying the data), which is necessary for data storage. It should also be noted that the execution of any application is a multiple repetition of the execution of the functions that comprise the application. That is, applications are executed on millions of processors, meaning that the same functional logic is executed repeatedly, consuming energy to execute this function. It can be said that eliminating the repeated calculations of the same functional logic can significantly reduce the energy consumption of computer systems. And reducing energy consumption can significantly extend the life of a cell phone battery, for example.
[8] Следовательно, недостатком известных решений в данной области техники является отсутствие возможности существенно снизить расход энергии в компьютерных системах.[8] Consequently, a disadvantage of known solutions in this area of technology is the inability to significantly reduce energy consumption in computer systems.
РАСКРЫТИЕ ИЗОБРЕТЕНИЯDISCLOSURE OF THE INVENTION
[9] В заявленном техническом решении предлагается новый подход к выполнению программного кода с помощью компьютерной вычислительной системы.[9] The claimed technical solution proposes a new approach to executing program code using a computer computing system.
[10] Таким образом, решается техническая проблема отсутствия возможности существенного снижения расхода энергии компьютерными системами. [10] This solves the technical problem of the impossibility of significantly reducing the energy consumption of computer systems.
[11] Техническим результатом, достигающимся при решении данной проблемы, является снижение энергопотребления компьютерными вычислительными системами.[11] The technical result achieved by solving this problem is a reduction in energy consumption by computer computing systems.
[12] Указанный технический результат достигается благодаря осуществлению способа выполнения программного кода, с помощью по меньшей мере одного процессора, соединенного с по меньшей мере одной памятью, содержащего этапы, на которых:[12] The specified technical result is achieved by implementing a method for executing program code using at least one processor connected to at least one memory, containing the steps of:
- получают программный код;- receive the program code;
- осуществляют обработку программного кода, в результате которой:- carry out processing of program code, as a result of which:
• определяют функции программного кода;• define the functions of the program code;
• определяют диапазон и шаг входных аргументов каждой функции программного кода;• determine the range and step of the input arguments of each function of the program code;
• выполняют регистрацию выходных значений функции для каждого набора значений входных аргументов;• perform registration of the output values of the function for each set of values of the input arguments;
- получают в результате предыдущего этапа массив значений, содержащий выходные значения исполняемых функций и соответствующие им входные значения;- as a result of the previous stage, an array of values is obtained, containing the output values of the executed functions and the corresponding input values;
- формируют базу знаний на основании полученного массива значений;- form a knowledge base based on the received array of values;
- сохраняют базу знаний в памяти;- store the knowledge base in memory;
- применяют полученную базу знаний для исполнения программного кода путем обращения процессора к полученной базе знаний.- use the obtained knowledge base to execute the program code by calling the processor to the obtained knowledge base.
[13] В одном из частных вариантов реализации способа при осуществлении обработки программного кода, конвертируют каждую функцию программного кода в микро-приложение.[13] In one of the particular embodiments of the method, when processing the program code, each function of the program code is converted into a micro-application.
[14] Кроме того, заявленный технический результат достигается за счет вычислительной системы для выполнения программного кода, содержащей:[14] In addition, the claimed technical result is achieved by a computing system for executing program code, containing:
- по меньшей мере одну память содержащую:- at least one memory containing:
• базу знаний содержащую массив значений, содержащий выходные значения исполняемых функций программного кода и соответствующие им входные значения; • a knowledge base containing an array of values containing the output values of the executable functions of the program code and the corresponding input values;
- по меньшей мере один процессор, выполненный с возможностью:- at least one processor configured to:
• получения входного значения для выполнения по меньшей мере одной функции;• receiving an input value for executing at least one function;
• передачи входного значения в базу знаний;• transferring the input value to the knowledge base;
• получения результата значения от базы знаний для выполнения функции программного кода.• obtaining the result value from the knowledge base to perform the function of the program code.
КРАТКОЕ ОПИСАНИЕ ЧЕРТЕЖЕЙBRIEF DESCRIPTION OF DRAWINGS
[15] Фиг. 1 иллюстрирует причины избыточного потребления энергии в современной вычислительной парадигме.[15] Fig. 1 illustrates the causes of excess energy consumption in the modern computing paradigm.
[16] Фиг. 2 иллюстрирует блок-схему заявленного способа.[16] Fig. 2 illustrates a block diagram of the claimed method.
[17] Фиг. 3 иллюстрирует способ дедупликации исполнения программного кода.[17] Fig. 3 illustrates a method for deduplicating the execution of program code.
[18] Фиг. 4 иллюстрирует пример трансформации выходных значений в нейронную сеть.[18] Fig. 4 illustrates an example of the transformation of output values in a neural network.
[19] Фиг. 5 иллюстрирует пример приложения как граф нейронных сетей.[19] Fig. 5 illustrates an example application as a neural network graph.
[20] Фиг. 6 иллюстрирует пример архитектуры вычислительной памяти.[20] Fig. 6 illustrates an example of a computing memory architecture.
[21] Фиг. 7 иллюстрирует пример способа параллельных вычислений.[21] Fig. 7 illustrates an example of a parallel computing method.
[22] Фиг. 8 иллюстрирует пример взаимодействия центрального процессора с вычислительной памятью.[22] Fig. 8 illustrates an example of interaction between the central processor and the computing memory.
ОСУЩЕСТВЛЕНИЕ ИЗОБРЕТЕНИЯ IMPLEMENTATION OF THE INVENTION
[23] Ниже будут описаны понятия и термины, необходимые для понимания данного технического решения.[23] Below we will describe the concepts and terms necessary for understanding this technical solution.
[24] Cache coherence problem - Проблема согласованности кэша возникает, когда несколько кэшей хранят копии одних и тех же данных в основной памяти системы, и изменения, сделанные в одном кэше, необходимо распространить на состоянии данных в основной памяти системы и на другие кэши. Несоблюдение согласованности кэша может привести к повреждению данных и некорректному поведению программы.[24] Cache coherence problem - A cache coherence problem occurs when multiple caches store copies of the same data in the system's main memory, and changes made in one cache must be propagated to the state of the data in the system's main memory and to other caches. Failure to maintain cache coherence can lead to data corruption and incorrect program behavior.
[25] Memory wall problem – проблема опережения производительности процессора пропускной способности памяти.[25] Memory wall problem – the problem of processor performance outpacing memory bandwidth.
[26] Data moving problem – проблема копирования или обмена данными между персистентной памятью, основной памятью (DRAM) системы и кешами процессора.[26] Data moving problem – the problem of copying or exchanging data between persistent memory, main memory (DRAM) of the system and processor caches.
[27] Power consumption problem – проблема роста энергопотребления при увеличении вычислительных мощностей.[27] Power consumption problem – the problem of increasing energy consumption with increasing computing power.
[28] Throughput bottleneck – проблема ограниченной пропускной способности интерфейсов взаимодействия.[28] Throughput bottleneck – a problem of limited throughput of interaction interfaces.
[29] Big Data problem – проблема обработки больших данных в рамках современных баз данных и систем хранения данных.[29] Big Data problem – the problem of processing large data within the framework of modern databases and data storage systems.
[30] Конечный автомат (КА) - математическая абстракция, модель дискретного устройства, имеющего один вход, один выход и в каждый момент времени находящегося в одном состоянии из множества возможных. Является частным случаем абстрактного дискретного автомата, число возможных внутренних состояний которого конечно.[30] A finite state machine (FSM) is a mathematical abstraction, a model of a discrete device that has one input, one output, and is in one state out of a set of possible states at any given moment. It is a special case of an abstract discrete FSM, the number of possible internal states of which is finite.
[31] При работе на вход КА последовательно поступают входные воздействия, а на выходе КА формирует выходные сигналы. Обычно под входными воздействиями принимают подачу на вход автомата символов одного алфавита, а на выход КА в процессе работы выдаёт символы в общем случае другого, возможно даже не пересекающегося со входным, алфавита.[31] During operation, input signals are sequentially received at the input of the automatic control system, and at the output, the automatic control system generates output signals. Typically, input signals are received as symbols of one alphabet at the input of the automatic control system, and at the output, during operation, the automatic control system produces symbols of a generally different alphabet, possibly even one that does not overlap with the input alphabet.
[32] В данном решении под системой подразумевается компьютерная система, ЭВМ (электронно-вычислительная машина), ЧПУ (числовое программное управление), ПЛК (программируемый логический контроллер), компьютеризированные системы управления и любые другие устройства, способные выполнять заданную, чётко определённую последовательность вычислительных операций (действий, инструкций).[32] In this solution, the term “system” refers to a computer system, a computer (electronic computer), a numerical control (CNC), a PLC (programmable logic controller), computerized control systems, and any other devices capable of performing a given, clearly defined sequence of computing operations (actions, instructions).
[33] Под устройством обработки команд подразумевается электронный блок либо интегральная схема (микропроцессор), исполняющая машинные инструкции (программы).[33] A command processing unit is an electronic unit or integrated circuit (microprocessor) that executes machine instructions (programs).
[34] Устройство обработки команд считывает и выполняет машинные инструкции (программы) с одного или более устройства хранения данных, например, таких устройств, как оперативно запоминающие устройства (ОЗУ) и/или постоянные запоминающие устройства (ПЗУ). В качестве ПЗУ могут выступать, но, не ограничиваясь, жесткие диски (HDD), флеш-память, твердотельные накопители (SSD), оптические носители данных (CD, DVD, BD, MD и т.п.) и др.[34] The command processing unit reads and executes machine instructions (programs) from one or more data storage devices, such as random access memory (RAM) and/or read-only memory (ROM). ROM may include, but is not limited to, hard disk drives (HDD), flash memory, solid-state drives (SSD), optical storage media (CD, DVD, BD, MD, etc.), etc.
[35] Программа - последовательность инструкций, предназначенных для исполнения устройством управления вычислительной машины или устройством обработки команд.[35] A program is a sequence of instructions intended for execution by a computer control device or a command processing device.
[36] Как показано на Фиг. 1 современная вычислительная система включает в себя центральный процессор (102), оперативную память (101) и персистентную память (104). Персистентная память (104) предназначена для хранения файлов приложений (105) и файлов данных (106). [36] As shown in Fig. 1, a modern computing system includes a central processing unit (102), RAM (101), and persistent memory (104). The persistent memory (104) is intended for storing application files (105) and data files (106).
[37] Любой вычислительный процесс начинается с того, что операционная система создает процесс, представленный специально определенной структурой в оперативной памяти (101). После этого происходит вычитывание кода логики приложения (107) из файла приложения (105) в персистентной памяти (104). [37] Any computing process begins with the operating system creating a process represented by a specially defined structure in RAM (101). After this, the application logic code (107) is read from the application file (105) in persistent memory (104).
[38] Когда процесс получает кванты времени на исполнение, то машинные коды операций переносятся (108) из оперативной памяти (101) в программный кэш (103) центрального процессора (102). После этого исполнительное ядро центрального процессора (102) выбирает машинные коды инструкций из программного кэша (103) и выполняет исполнение каждой инструкции (109). [38] When a process receives time slices for execution, the machine codes of the instructions are transferred (108) from the RAM (101) to the software cache (103) of the central processor (102). After this, the execution core of the central processor (102) fetches the machine codes of the instructions from the software cache (103) and executes each instruction (109).
[39] Обычно, исполнение инструкций заключается в модификации или генерации некоторых данных, которые исходно сохраняются в кэше данных центрального процессора (102). Модифицированные линии кэша процессора нуждаются в сохранении (110) в оперативную память (101). В конечном итоге, модифицированные или «грязные» страницы оперативной памяти (101) файлов данных (106) нуждаются в сохранении (111) в персистентную память (104). [39] Typically, executing instructions involves modifying or generating some data, which is initially stored in the CPU data cache (102). The modified CPU cache lines need to be saved (110) to RAM (101). Finally, the modified or "dirty" RAM pages (101) of the data files (106) need to be saved (111) to persistent memory (104).
[40] Как было указано выше, современная вычислительная парадигма результируется в существенном потреблении энергии в силу большого выделения энергии/тепла ядрами процессора, работающих на высоких частотах. Более того, данные и исполнимый код хранятся в DRAM памяти, которая расходует энергию на операцию обновления без модификации данных, необходимую для хранения данных.[40] As noted above, the modern computing paradigm results in significant energy consumption due to the large amount of energy/heat generated by processor cores operating at high frequencies. Moreover, data and executable code are stored in DRAM memory, which consumes energy for the update operation without modifying the data required for data storage.
[41] Исполнение любого приложения представляет собой многократное повторение исполнения функций, из которых состоит приложение. То есть, приложения исполняются на миллионах процессоров и это означает, что одна и та же логика функции исполняется многократно, расходуя энергию на исполнение этой функции. Исключение расчетов одной и той же логики функции многократно способно существенно сократить расход энергии в компьютерных системах. А сокращение расхода энергии может существенно продлевать срок службы аккумулятора сотового телефона, к примеру.[41] The execution of any application involves multiple executions of the functions that comprise it. This means that applications run on millions of processors, meaning that the same function logic is executed repeatedly, expending energy on its execution. Eliminating repeated calculations of the same function logic can significantly reduce energy consumption in computer systems. And reducing energy consumption can significantly extend the life of a cell phone battery, for example.
[42] Традиционно, компилятор трансформирует исходный код, написанный на языке высокого уровня, в бинарный машинный код, который может быть исполнен процессором. Это означает, что одна и та же функция, представленная бинарным кодом, многократно исполняется процессором, даже для случая одних и тех же входных данных. Однако, любая функция имеет набор входных аргументов и результатом ее работы является некоторое значение или объект данных. Технически, можно представить, что для каждого случая входных данных возможно сохранить результат расчета или выходное значение. Если иметь «полный набор» таких значений, то повторять расчет не нужно, поскольку его можно найти в таблице или массиве выходных значений. Фактически, это означает что можно не расходовать энергию на расчет результата функции и сам результат можно найти быстрее, поскольку расчет может требовать значительного времени на исполнение.[42] Traditionally, a compiler transforms source code written in a high-level language into binary machine code that can be executed by a processor. This means that the same function, represented by binary code, is executed by the processor multiple times, even for the same input data. However, any function has a set of input arguments, and its result is a value or data object. Technically, one can imagine that for each input data case, it is possible to store the result of a calculation or an output value. If a "complete set" of such values is available, then there is no need to repeat the calculation, since it can be found in a table or array of output values. In fact, this means that energy can be expended on calculating the function's result, and the result itself can be found faster, since the calculation can require significant execution time.
[43] Как показано на Фиг. 2 способ выполнения программного кода (800) состоит из нескольких этапов.[43] As shown in Fig. 2, the method for executing the program code (800) consists of several steps.
[44] На этапе (801) получают программный код.[44] At step (801), a program code is obtained.
[45] Далее на этапе (802) осуществляют обработку программного кода.[45] Next, at step (802), the program code is processed.
[46] На данном этапе определяют функции программного кода, определяют диапазон и шаг входных аргументов каждой функции программного кода, выполняют регистрацию выходных значений функции для каждого набора значений входных аргументов.[46] At this stage, the functions of the program code are determined, the range and step of the input arguments of each function of the program code are determined, and the output values of the function are registered for each set of values of the input arguments.
[47] В одном из вариантов реализации изобретения при осуществлении обработки программного кода, конвертируют каждую функцию программного кода в микро-приложение.[47] In one embodiment of the invention, when processing the program code, each function of the program code is converted into a micro-application.
[48] Далее на этапе (803) получают в результате предыдущего этапа (802) массив значений, содержащий выходные значения исполняемых функций и соответствующие им входные значения.[48] Next, at step (803), as a result of the previous step (802), an array of values is obtained containing the output values of the executed functions and the corresponding input values.
[49] Далее на этапе (804) формируют базу знаний на основани полученного массива значений.[49] Next, at step (804), a knowledge base is formed based on the obtained array of values.
[50] Далее на этапе (805) сохраняют базу знаний в памяти.[50] Next, at step (805), the knowledge base is stored in memory.
[51] И на этапе (806) применяют полученную базу знаний для исполнения программного кода путем обращения процессора к полученной базе знаний.[51] And at step (806) the obtained knowledge base is used to execute the program code by calling the processor to the obtained knowledge base.
[52] Рассмотрим подробно реализацию заявленного способа.[52] Let us consider in detail the implementation of the claimed method.
[53] Как показано на Фиг. 3 процесс разработки любого программного обеспечения включает этап тестирования и исправления ошибок (201). Фактически, это первый этап, на котором исполнение одних и тех же участков кода (или функций) повторяется множество раз. То есть, на этапе тестирования формируется для каждой функции приложения массив значений, которые ставят в соответствие набору входных значений некоторое множество выходных или результирующих значений (202). Проводится проверка и коррекция (203) полученного массива данных (data pre-processing) с целью подготовки данных для тренировки нейронных сетей, к примеру, как следующий этап после тестирования программного обеспечения. [53] As shown in Fig. 3, the process of developing any software includes a testing and error correction stage (201). In fact, this is the first stage, during which the execution of the same sections of code (or functions) is repeated many times. That is, during the testing stage, an array of values is formed for each function of the application, which corresponds to a set of input values to a certain set of output or resulting values (202). Checking and correction (203) of the obtained data array is carried out (data pre-processing) in order to prepare the data for training neural networks, for example, as the next stage after software testing.
[54] После этого полученный массив данных может быть преобразован либо в базу знаний (в виде массива значений в памяти, к примеру) (204А), либо в нейронную сеть (204B) (как более компактное представление) с целью использовать это знание для быстрой конвертации входных значений функции в результирующее значение без выполнения исполнения программного кода (205). [54] The resulting data array can then be converted into either a knowledge base (in the form of an array of values in memory, for example) (204A) or a neural network (204B) (as a more compact representation) in order to use this knowledge to quickly convert the input values of a function into a resulting value without executing any program code (205).
[55] Технически, база знаний может быть неполной в силу ограниченного объема тестирования или намеренного сокращения объема входных значений. То есть, это может означать необходимость осуществления исполнения программного кода, если в базе данных нет значений для определенных экземпляров входных данных, либо с целью проверки вывода нейронной сети. [55] Technically, a knowledge base may be incomplete due to limited testing scope or a deliberate reduction in the number of input values. That is, this may mean that program code must be executed if the database does not contain values for certain input data instances, or for the purpose of validating the output of a neural network.
[56] Технически, нейронная сеть способна делать прогноз для тех входных значений, которых не было в массиве данных, использованных для тренировки нейронной сети. Но вполне возможна ситуация, когда может потребоваться дополнительное тестирование программного кода (201) и новая тренировка нейронных сетей (204B) как результат неудовлетворительной работы подсистемы дедупликации исполнения программного кода.[56] Technically, a neural network is capable of making predictions for input values that were not present in the dataset used to train the neural network. However, it is entirely possible that additional testing of the program code (201) and retraining of the neural networks (204B) may be required as a result of unsatisfactory performance of the program code execution deduplication subsystem.
[57] Заявленный способ выполнения программного кода обладает рядом преимуществ:[57] The claimed method of executing program code has a number of advantages:
1) Реализация заявленного способа уменьшает потребляемую энергию вычислительной системой за счет более энергоэффективного поиска в базе знаний или использования компактной нейронной сети вместо выполнения энергозатратного вычисления ядром процессора.1) The implementation of the claimed method reduces the energy consumed by the computing system due to a more energy-efficient search in the knowledge base or the use of a compact neural network instead of performing energy-intensive calculations by the processor core.
2) Реализация заявленного способа уменьшает потребляемую энергию вычислительной системой за счет использования персистентной памяти вместо DRAM, поскольку в отличии от DRAM персистентная память не нуждается в обновлении операции для хранения данных.2) The implementation of the claimed method reduces the energy consumed by the computing system by using persistent memory instead of DRAM, since, unlike DRAM, persistent memory does not require updating operations to store data.
3) Реализация заявленного способа увеличивает производительность исполнения программного кода за счет более быстрого поиска в базе знаний или более быстрых операций нейронной сети.3) The implementation of the claimed method increases the performance of program code execution due to faster search in the knowledge base or faster neural network operations.
4) Реализация заявленного способа предлагает глубоко параллельную модель исполнения за счет способности одновременно получать результаты разных функций для разных потоков исполнения, что может существенно улучшить общую производительность вычислительной системы.4) The implementation of the claimed method offers a deeply parallel execution model due to the ability to simultaneously obtain the results of different functions for different execution threads, which can significantly improve the overall performance of the computing system.
5) Реализация заявленного способа предлагает осуществлять основные вычислительные операции в пространстве специально организованной вычислительной памяти, что способно разгрузить CPU от выполнения вычислений и существенно улучшить производительность вычислительной системы за счет массивно параллельных вычислительных операций в пространстве памяти.5) The implementation of the claimed method proposes to carry out the main computing operations in the space of a specially organized computing memory, which is capable of unloading the CPU from performing calculations and significantly improving the performance of the computing system due to massively parallel computing operations in the memory space.
[58] Любое программное обеспечение представляет собой некоторый исполнимый модуль, состоящий из некоторого набора функций или методов, вызываемых одна за другой с целью реализации логики некоторого алгоритма. Одной из фундаментальных парадигм программирования является переиспользование реализованного функционала в виде функций или экземпляров классов, с целью уменьшения размера исполнимого модуля, сокращения объема тестирования и уменьшения количества ошибок в коде. Это означает что одна и та же функция может быть вызвана множество раз другими функциями или подсистемами приложения. То есть, другими словами исполнение одной и той же функции может повторяться многократно и даже с одними и теми же входными аргументами.[58] Any software is an executable module consisting of a set of functions or methods called one after another to implement the logic of a certain algorithm. One of the fundamental programming paradigms is the reuse of implemented functionality in the form of functions or class instances, with the goal of reducing the size of the executable module, reducing the amount of testing, and reducing the number of errors in the code. This means that the same function can be called multiple times by other functions or application subsystems. In other words, the execution of the same function can be repeated many times, even with the same input arguments.
[59] Фактически, любое приложение можно трансформировать в некоторый набор функций, каждая из которых может быть тестирована независимо. То есть, технически каждая функция может быть трансформирована в микро-приложение, задачей которого является подача на вход функции некоторого набора входных значений и вычисление результата работы функции с целью формирования массива или тензора зависимости выходных значений функции от входных. В конечном итоге, весь набор микроприложений может исполняться множеством ядер или/и систем с целью провести тестирование в массивно параллельном режиме.[59] In fact, any application can be transformed into a set of functions, each of which can be tested independently. That is, technically, each function can be transformed into a micro-application, the purpose of which is to feed the function a set of input values and calculate the function's output in order to form an array or tensor of the function's output values as a function of the input values. Ultimately, the entire set of micro-applications can be executed by multiple cores and/or systems for testing in a massively parallel mode.
[60] Однако, ситуация не столь проста, поскольку тело или логика конкретной функции может включать вызовы других функций, а также возвращать ошибки. Прежде всего, каждая функция обладает входными параметрами и результатом ее работы является некоторое значение или экземпляр выходного значения. Как входные параметры, так и выходное значение являются величинами определенного типа данных, который может принимать некоторое конкретное значение из некоторого множества значений соответствующего типа данных.[60] However, the situation is not so simple, since the body or logic of a particular function may include calls to other functions and also return errors. First of all, each function has input parameters and the result of its work is a certain value or an instance of an output value. Both the input parameters and the output value are values of a certain data type, which can take a certain specific value from a certain set of values of the corresponding data type.
[61] То есть, независимое тестирование каждой функции означает необходимость определить некоторый диапазон входных значений и шаг, с которым входные значения будут выбираться из полного множества значений и подаваться на вход функции для работы алгоритма. Таким образом, диапазон значений и шаг определяют конечное количество шагов для получения некоторого множества выходных значений функции.[61] That is, independent testing of each function means the need to determine a certain range of input values and the step with which the input values will be selected from the full set of values and fed to the function input for the algorithm to operate. Thus, the range of values and the step determine a finite number of steps to obtain a certain set of output values of the function.
[62] Выходное значение функции тоже является определенным типом данных и это означает что если функция вызывает другие функции, то вместо их реального исполнения возможно результат их работы заменить на некоторый диапазон выходных значений, который может принимать значения с некоторым шагом. Потенциально, можно использовать готовые результаты тестирования функций, поскольку тестирование можно начинать снизу-вверх.[62] The output value of a function is also a specific data type, meaning that if a function calls other functions, instead of actually executing them, the result of their work can be replaced with a range of output values, which can take on values with a certain increment. Potentially, it is possible to use the results of ready-made function tests, since testing can begin from the bottom up.
[63] Кроме того, можно в качестве результата работы функций также рассматривать возвращение некоторого набора кодов ошибок, с целью тестирования готовности функции корректно обрабатывать ошибки вызываемых функций. [63] In addition, the return of a certain set of error codes can also be considered as the result of the functions’ work, in order to test the function’s readiness to correctly handle errors of called functions.
[64] Таким образом, возможно сформировать пространство тестирования функции в виде комбинации всех возможных путей исполнения, которые нужно проверить с целью получить выходное множество значений работы функции.[64] It is thus possible to form a function's testing space as a combination of all possible execution paths that need to be tested in order to obtain the output set of values for the function's operation.
[65] В итоге, задачей каждого микроприложения является проведение вычислений в рамках пространства тестирования посредством исполнения всего набора путей исполнения с целью формирования пространства зависимости выходного значения от значений входных параметров.[65] Ultimately, the task of each micro-application is to perform computations within the testing space by executing the entire set of execution paths in order to form a dependence space of the output value on the values of the input parameters.
[66] Таким образом, первым шагом способа является вычисление множества выходных значений функции для некоторого выбранного множества входных аргументов. То есть, логика функции изолируется в микроприложение, для каждого такого приложения определяется диапазон входных значений, которые должны быть поданы на вход функции. Этот диапазон входных значений может быть исходно сохранен в файл или микроприложение может быть способно генерировать входные значения на основании заданного диапазона и шага. Результатом работы микроприложения должен быть массив выходных значений функции, который может быть сохранен в файл или оставаться в памяти для выполнения следующего шага метода.[66] Thus, the first step of the method is to calculate a set of output values of the function for a selected set of input arguments. That is, the logic of the function is isolated into a micro-application, and for each such application, a range of input values is defined that must be fed to the function input. This range of input values can be initially saved to a file, or the micro-application can be capable of generating input values based on a specified range and step. The result of the micro-application should be an array of output values of the function, which can be saved to a file or retained in memory for the next step of the method.
[67] Если входные значения представляют собой непрерывный диапазон значений и объем выходных значений не столь велик, то выходные значения функции можно представить двумерным, трехмерным или, в общем случае, N-мерным массивом чисел. Входные значения аргументов могут выступать индексами в этом массиве и сохранять нужно только выходные значения функций.[67] If the input values represent a continuous range of values and the volume of output values is not so large, then the output values of the function can be represented as a two-dimensional, three-dimensional, or, in general, N-dimensional array of numbers. The input values of the arguments can act as indices into this array, and only the output values of the functions need to be stored.
[68] Однако, если использовать некоторый достаточно большой диапазон значений, которые подаются на вход функции с некоторым шагом, то представление в виде массива не является оптимальным и не дает точное сопоставление входных значений с выходными значениями функции. В таком случае, можно рассматривать некоторый вариант дерева или другой структуры, которая способна сопоставить входные значения с выходными значениями и использоваться для поиска в массиве данных выходных значений функции.[68] However, if a sufficiently large range of values is used, which are fed to the function's input with a certain step, then the array representation is not optimal and does not provide an exact mapping of the input values to the function's output values. In such a case, one can consider some version of a tree or other structure that is capable of mapping the input values to the output values and can be used to search the data array for the function's output values.
[69] Основной идеей способа является исключение повторного исполнения программного кода посредством замены процесса исполнения на операцию выбора значения в массиве, полученном на этапе тестирования. Если представить, что мы храним массив в быстрой персистентной памяти, то операция выбора значения из массива по индексу одновременно достаточно быстрая операция и не требует больших энергетических затрат, поскольку персистентная память не требует обновленной операции для хранения данных в отличии от DRAM.[69] The main idea of the method is to eliminate the repeated execution of program code by replacing the execution process with the operation of selecting a value in the array obtained during the testing phase. If we imagine that we store the array in fast persistent memory, then the operation of selecting a value from the array by index is both a fairly fast operation and does not require large energy costs, since persistent memory does not require an updated operation to store data, unlike DRAM.
[70] Проблема заключена в том, что даже для одной функции массив выходных значений может быть достаточно большим, что в итоге может требовать огромных объемов памяти. Более того, приложение может содержать очень много функций, что в итоге приводит к невозможности поместить все данные в память. Однако, нейронная сеть может быть рассмотрена как решение этой проблемы. Поскольку, нейронная сеть может быть довольно компактным представлением некоторого знания. Фактически, полученная матрица выходных значений функции может быть использована для тренировки нейронной сети с целью получить набор весов, способных трансформировать входные значения функции в результат или выходное значение функции. Как результат, нейронная сеть может быть использована для конвертации набора входных аргументов в результирующее выходное значение функции вместо исполнения кода функции.[70] The problem is that even for a single function, the array of output values can be quite large, which can ultimately require huge amounts of memory. Moreover, an application can contain a large number of functions, which ultimately makes it impossible to fit all the data into memory. However, a neural network can be considered as a solution to this problem. Since a neural network can be a fairly compact representation of some knowledge, the resulting matrix of function output values can be used to train a neural network to obtain a set of weights that can transform the input values of the function into the result or output value of the function. As a result, the neural network can be used to convert a set of input arguments into the resulting output value of the function instead of executing the function code.
[71] Как показано на Фиг. 4 тестирование кода отдельной функции формирует массив выходных значений (301). Если массив значений небольшой по размеру и представляет собой непрерывное множество значений, то, технически, этот массив можно использовать напрямую посредством использования входных значений в качестве индексов в этом массиве. Однако, если выходной массив (301) достаточно большой, то есть, включает большое количество страниц памяти (302), и не является непрерывным множеством значений, то нейронная сеть (303) может представлять более компактное представление знания о логике функции. То есть, посредством тренировки нейронной сети (303) нейроны (304) хранят знание о преобразовании входных значений в выходные значения. Более того, нейронная сеть может быть способна предсказывать те выходные значения, которые не были получены в рамках тестирования и тренировки нейронной сети.[71] As shown in Fig. 4, testing the code of a single function produces an array of output values (301). If the array of values is small in size and represents a contiguous set of values, then, technically, this array can be used directly by using the input values as indices into this array. However, if the output array (301) is large enough, that is, it includes a large number of memory pages (302), and is not a contiguous set of values, then the neural network (303) can represent a more compact representation of the knowledge about the logic of the function. That is, by training the neural network (303), the neurons (304) store knowledge about the transformation of input values into output values. Moreover, the neural network may be able to predict those output values that were not obtained as part of testing and training the neural network.
[72] В результате, каждая функция приложения может быть конвертирована в нейронную сеть, а само приложение может представлять граф нейронных сетей. То есть, вместо исполнения программного кода, поток исполнения приложения будет выглядеть как прохождение через некоторое множество нейронных сетей. И на каждом этапе нейронная сеть получает входные аргументы и выдает результат.[72] As a result, each application function can be converted into a neural network, and the application itself can be represented as a graph of neural networks. That is, instead of executing program code, the application's execution flow will look like passing through a set of neural networks. And at each stage, the neural network receives input arguments and produces a result.
[73] На Фиг. 5 показана структура приложения в результате конвертации функций в нейронные сети. Исполнение любого приложения начинается с вызова функции main() (402). Обычно, функция main() включает вызовы методов, которые представляют собой последовательность машинных инструкций, которые должны быть выполнены центральным процессором. Суть предложенного метода состоит в том, что логика каждой функции (403) заменяется нейронной сетью, которая на выходе должна давать некоторое результирующее значение на основании входных аргументов функции. Фактически, базовой абстракцией метода является быстрый поиск ответа, напоминающий обращение к массиву данных на основании индекса. Поскольку пространство поиска может быть достаточно большим, то простой массив значений заменяется на нейронную сеть, способную реализовать более компактное представление пространства поиска.[73] Figure 5 shows the structure of the application as a result of converting functions into neural networks. The execution of any application begins with a call to the main() function (402). Typically, the main() function includes method calls, which represent a sequence of machine instructions to be executed by the central processor. The essence of the proposed method is that the logic of each function (403) is replaced by a neural network, which must produce a certain output value based on the input arguments of the function. In fact, the basic abstraction of the method is a fast search for an answer, reminiscent of accessing an array of data based on an index. Since the search space can be quite large, a simple array of values is replaced by a neural network capable of implementing a more compact representation of the search space.
[74] Любая нейронная сеть представляет собой набор слоев, каждый из которых содержит некоторое количество нейронов. Количество нейронов и слоев определяется архитектурой и функционалом конкретной нейронной сети. Нейронная сеть может быть реализована в рамках персистентной памяти, базовым элементом которой может быть нейрон или исполняющая ячейка памяти. В такой нейрон могут входить: (1) набор ячеек памяти или регистров для хранения анализируемой величины, (2) набор ячеек памяти или регистров для хранения веса, (3) функция активации. Таким образом, нейроны могут объединяться в слои, количество нейронов в слое и количество слоев определяется архитектурой конкретной нейронной сети. [74] Any neural network is a set of layers, each containing a certain number of neurons. The number of neurons and layers is determined by the architecture and functionality of a specific neural network. A neural network can be implemented within a persistent memory, the basic element of which can be a neuron or an execution memory cell. Such a neuron can include: (1) a set of memory cells or registers for storing the analyzed value, (2) a set of memory cells or registers for storing weights, (3) an activation function. Thus, neurons can be combined into layers, the number of neurons in a layer and the number of layers are determined by the architecture of a specific neural network.
[75] Фактически, логика работы нейронной сети определяется матрицей или тензором весов, которая должна быть загружена в соответствующие ячейки памяти весов нейронов перед началом работы нейронной сети. Поскольку, планируется использовать персистентную память для реализации нейронной сети, то матрица весов может быть загружена один раз и использоваться многократно, даже в условиях холодной перезагрузки системы. [75] In fact, the neural network's operating logic is determined by a weight matrix or tensor, which must be loaded into the corresponding neuron weight memory cells before the neural network begins operating. Since persistent memory is planned for the neural network's implementation, the weight matrix can be loaded once and reused multiple times, even during a cold reboot of the system.
[76] Первый слой нейронов получает входные значения, которые представляют входные аргументы функции, и производит первый этап обработки входных значений. Результат работы нейронов первого слоя подается в качестве входных значений для нейронов очередного слоя, и такая логика повторяется до тех пор, пока не будут пройдены все слои нейронной сети и будет получен финальный результат работы нейронной сети.[76] The first layer of neurons receives input values, which represent the input arguments of the function, and performs the first stage of processing the input values. The output of the neurons of the first layer is fed as input values to the neurons of the next layer, and this logic is repeated until all layers of the neural network have been processed and the final output of the neural network is obtained.
[77] Между слоями нейронной сети может находиться interconnection network, задачей которой является реализация взаимодействия нейронов разных слоев посредством реализации схемы взаимодействия каждого с каждым.[77] Between the layers of a neural network there may be an interconnection network, the purpose of which is to implement the interaction of neurons in different layers by implementing a scheme for the interaction of each with each other.
[78] Реализация конечного автомата функционирования нейронной сети может быть осуществлена специальной подсистемой управления (management unit). Поскольку любая функция приложения обычно реализует достаточно детерминистическую логику, то можно ожидать достаточно компактное представление нейронной сети, состоящую из небольшого количества нейронов и слоев. Поэтому нейронная сеть может быть более быстрым и более энергоэффективным решением, чем классическое исполнение процессором, особенно если исполнение программного кода требует циклов или рекурсивного исполнения логики функции.[78] The implementation of a finite state machine for a neural network can be accomplished by a dedicated management unit. Since any application function typically implements fairly deterministic logic, a fairly compact representation of a neural network, consisting of a small number of neurons and layers, can be expected. Therefore, a neural network can be a faster and more energy-efficient solution than classical processor execution, especially if the execution of program code requires loops or recursive execution of the function's logic.
[79] Таким образом, можно представить трехмерную архитектуру вычислительной персистентной памяти, в которой в одном измерении находятся слои нейронной сети, а в другом измерении находятся разные нейронные сети. То есть, в таком трехмерном пространстве можно расположить множество функций приложения, каждая из которых реализуется индивидуальной нейронной сетью. [79] Thus, one can imagine a three-dimensional architecture of computational persistent memory, in which neural network layers are located in one dimension, and different neural networks are located in the other dimension. That is, in such a three-dimensional space, one can arrange multiple application functions, each of which is implemented by an individual neural network.
[80] Трехмерное пространство нейронных сетей (или функций) можно дополнить сверху и снизу специальными слоями памяти, которые будут представлять собой конвейер, в котором могут перемещаться входные данные (или аргументы) функций и помещаться выходные данные или результаты работы функций. Фактически, конвейер представляет собой последовательность позиций, каждая из которых ассоциирована с соответствующей функцией или нейронной сетью. Помещая некоторые данные на первую позицию (например, на верхний конвейер), мы определяем входные аргументы первой функции или нейронной сети.[80] The three-dimensional space of neural networks (or functions) can be supplemented at the top and bottom with special memory layers that will constitute a pipeline in which input data (or arguments) of functions can move and output data or results of the functions can be placed. In fact, a pipeline is a sequence of positions, each of which is associated with a corresponding function or neural network. By placing some data in the first position (for example, on the top pipeline), we define the input arguments of the first function or neural network.
[81] Нейронная сеть обрабатывает входные аргументы и помещает результат своей работы в нижний конвейер. После чего эти данные могут быть сдвинуты на вторую позицию в нижнем конвейере и быть поданы на вход второй нейронной сети, которая выдаст результат своей работы в верхний конвейер. Такая последовательность шагов может продолжаться до тех пор, пока не будут задействованы все функции, которые должны быть задействованы в этом алгоритме. В конечном итоге, результат работы алгоритма окажется в некоторых адресах памяти, к которым может обратиться CPU.[81] The neural network processes the input arguments and places the result of its work into the lower pipeline. This data can then be shifted to the second position in the lower pipeline and fed to the input of a second neural network, which will output its result into the upper pipeline. This sequence of steps can continue until all the functions required by the algorithm have been executed. Ultimately, the result of the algorithm's work will end up in some memory addresses that the CPU can access.
[82] Исполнение конкретного алгоритма может не требовать вовлечения всех последовательно лежащих функций. Более того, физическое расположение функций может быть таково, что исполнение конкретного алгоритма может требовать исключить некоторую функцию из потока исполнения. Поэтому, предлагаемая архитектура может нуждаться в верхнем и нижнем bitmap’е, задачей которых является определить какая функция будет исполнена, а какая нет в текущем алгоритме.[82] The execution of a particular algorithm may not require the involvement of all successive functions. Moreover, the physical arrangement of functions may be such that the execution of a particular algorithm may require excluding some function from the execution flow. Therefore, the proposed architecture may require an upper and lower bitmap, the purpose of which is to determine which function will be executed and which will not in the current algorithm.
[83] Таким образом, если некоторая функция или функции не исполняются, то производится сдвиг данных до позиции той функции, которая должна быть исполнена на следующем этапе или шаге алгоритма.[83] Thus, if some function or functions are not executed, then the data is shifted to the position of the function that must be executed at the next stage or step of the algorithm.
[84] Фиг. 6 представляет трехмерную архитектуру вычислительной памяти (501). Центральная часть вычислительной памяти представлена трехмерным массивом нейронов (506), способных реализовать нейронные сети. Фактически, массив нейронов (506) должен быть распределен между множеством нейронных сетей (507), каждая из которых представляет отдельную функцию. В итоге, вычислительная память (501) есть совокупность нейронных сетей (507), каждая из которых может получить набор значений на входе и выдать результат на выход.[84] Fig. 6 shows a three-dimensional architecture of the computational memory (501). The central part of the computational memory is represented by a three-dimensional array of neurons (506) capable of implementing neural networks. In fact, the array of neurons (506) must be distributed among a plurality of neural networks (507), each of which represents a separate function. As a result, the computational memory (501) is a set of neural networks (507), each of which can receive a set of values at the input and produce a result at the output.
[85] Сверху массива нейронных сетей (506) находится верхний слой памяти (504) и нижний слой памяти (505). Верхний (504) и нижний (505) слои памяти представляют собой конвейер данных, на который могут помещаться входные данные (или аргументы) и выдаваться результаты работы нейронных сетей. Исходно данные помещаются в начало конвейера и могут сдвигаться с целью подачи на вход требуемой функции, представленной нейронной сетью (507). Предположим, что исходно порция данных помещается в верхний конвейер данных (504) и помещается на вход первой функции. После обработки данных первой функцией, результат попадает в нижний конвейер данных (505), после чего он сдвигается на вход функции, которая должна быть исполнена следующей в соответствии с логикой алгоритма.[85] On top of the neural network array (506) is the upper memory layer (504) and the lower memory layer (505). The upper (504) and lower (505) memory layers represent a data pipeline onto which input data (or arguments) can be placed and the results of the neural networks can be output. Initially, data is placed at the beginning of the pipeline and can be shifted in order to feed the required function represented by the neural network (507). Suppose that initially a portion of data is placed in the upper data pipeline (504) and placed as the input of the first function. After the data is processed by the first function, the result goes to the lower data pipeline (505), after which it is shifted to the input of the function that should be executed next in accordance with the logic of the algorithm.
[86] Выбранная функция берет входные данные из нижнего конвейера (505), осуществляет их обработку и помещает результат в верхний конвейер (504). Такая последовательность шагов может повторяться несколько раз до полного исполнения алгоритма. Описанная логика может быть дополнена верхним (502) и нижним (503) битовыми массивами, которые могут определять должны ли данные обрабатываться функцией на определенной позиции. То есть, если соответствующий бит массива (502, 503) выставлен в единицу, то функция на этой позиции должна обработать входные данные. Если же бит выставлен в ноль, то данные должны быть смещены на одну позицию к следующей функции. На основании такой логики вычислительная память может реализовать логику обработки данных.[86] The selected function takes the input data from the lower pipeline (505), processes it, and places the result in the upper pipeline (504). This sequence of steps can be repeated several times until the algorithm is fully executed. The described logic can be supplemented with upper (502) and lower (503) bit arrays, which can determine whether the data should be processed by the function at a certain position. That is, if the corresponding bit of the array (502, 503) is set to one, then the function at this position should process the input data. If the bit is set to zero, then the data should be shifted one position to the next function. Based on this logic, the computing memory can implement the data processing logic.
[87] Предлагаемая архитектура вычислительной персистентной памяти способна обеспечить массово параллельную модель исполнения.[87] The proposed architecture of computational persistent memory is capable of providing a massively parallel execution model.
[88] Фиг. 7 демонстрирует механизм физически параллельных вычислений в рамках архитектуры вычислительной памяти (602). Верхний (604) и нижний (605) конвейеры содержат позиции хранения входных (или выходных) данных для каждой нейронной сети (603). Соответственно, нейронные сети могут вести обработку данных физически параллельно при наличии входных данных. Массив входных данных может готовиться и подаваться на вход нейронных сетей одновременно, либо сдвиги данных в конвейере будут формировать входные данные на каждом шаге исполнения алгоритма. Имеется в виду, что начало исполнения каждого алгоритма может быть сдвинуто во времени, но физически несколько алгоритмов будут исполняться одновременно.[88] Fig. 7 demonstrates the mechanism of physically parallel computing within the framework of the computing memory architecture (602). The upper (604) and lower (605) pipelines contain storage positions for input (or output) data for each neural network (603). Accordingly, neural networks can process data physically in parallel if input data are available. An array of input data can be prepared and fed to the input of neural networks simultaneously, or data shifts in the pipeline will form input data at each step of the algorithm execution. This means that the start of the execution of each algorithm can be shifted in time, but physically several algorithms will be executed simultaneously.
[89] Если обратить внимание на конвейер, то можно заметить, что на каждом шаге каждой функции или нейронной сети могут быть поданы свои входные данные. То есть, вполне можно подготовить набор данных, который можно сдвигать последовательно слева направо. На каждом шаге несколько функций могут вести обработку данных параллельно. Это означает что архитектура вычислительной персистентной памяти способна выполнять несколько алгоритмов параллельно. Количество параллельно выполняемых алгоритмов определяется длиной конвейера или количеством функций, следующих друг за другом в трехмерном пространстве вычислительной памяти.[89] If we look at the pipeline, we can see that at each step, each function or neural network can be fed with its own input data. That is, it is quite possible to prepare a data set that can be shifted sequentially from left to right. At each step, several functions can process the data in parallel. This means that the persistent memory architecture is capable of executing multiple algorithms in parallel. The number of parallel algorithms is determined by the length of the pipeline or the number of functions following one another in the three-dimensional space of the computational memory.
[90] Заявленный способ реализуется с помощью вычислительной системы для выполнения программного кода содержащей:[90] The claimed method is implemented using a computing system for executing program code containing:
- по меньшей мере одну память содержащую:- at least one memory containing:
• базу знаний содержащую массив значений, содержащий выходные значения исполняемых функций программного кода и соответствующие им входные значения; • a knowledge base containing an array of values containing the output values of the executable functions of the program code and the corresponding input values;
• по меньшей мере один процессор, выполненный с возможностью:• at least one processor configured to:
• получения входного значения для выполнения по меньшей мере одной функции;• receiving an input value for executing at least one function;
• передачи входного значения в базу знаний;• transferring the input value to the knowledge base;
• получения результата значения от базы знаний для выполнения функции программного кода.• obtaining the result value from the knowledge base to perform the function of the program code.
[91] Фиг. 8 демонстрирует механизм взаимодействия центрального процессора (702) с вычислительной памятью (703). Каждое приложение (704) может быть представлено некоторой областью адресов в вычислительной памяти (703). Эта область адресов включает в себя некоторый набор нейронных сетей или функций, реализующих функционал приложения. Центральный процессор (702) должен на первом этапе (705) ассоциировать веса с позициями памяти приложения (704), с целью определить функциональную логику нейронных сетей. Технически, массив весов может быть определен в процессе тренинга нейронных сетей и сохранен персистентно в вычислительной памяти. С другой стороны, массив весов может подгружаться перед началом исполнения приложения, что может обеспечить большую гибкость в использовании пространства вычислительной памяти.[91] Fig. 8 demonstrates the mechanism of interaction of the central processor (702) with the computing memory (703). Each application (704) can be represented by a certain area of addresses in the computing memory (703). This area of addresses includes a certain set of neural networks or functions implementing the functionality of the application. The central processor (702) must, at the first stage (705), associate weights with the positions of the application memory (704) in order to determine the functional logic of the neural networks. Technically, the array of weights can be determined during the training of the neural networks and stored persistently in the computing memory. On the other hand, the array of weights can be loaded before the start of the application execution, which can provide greater flexibility in the use of the computing memory space.
[92] Следующим шагом (706) является подготовка входных данных центральным процессором (702) и подача на вход нейронных сетей приложений (704) в вычислительной памяти (703). Центральный процессор (702) может инициировать вычислительный процесс (707) одномоментно или подготавливать параллельные вычислительные процессы и последовательно инициировать в вычислительной памяти (703). По окончании исполнения алгоритма (или одного его шага) вычислительная память (703) уведомляет центральный процессор (702) об окончании вычислительного процесса в рамках приложения (704) и о готовности к исполнению следующего алгоритма (или его шага).[92] The next step (706) is the preparation of input data by the central processor (702) and feeding it to the input of the neural networks of the applications (704) in the computing memory (703). The central processor (702) can initiate the computing process (707) at one time or prepare parallel computing processes and initiate them sequentially in the computing memory (703). Upon completion of the execution of the algorithm (or one of its steps), the computing memory (703) notifies the central processor (702) of the completion of the computing process within the application (704) and of the readiness to execute the next algorithm (or its step).
[93] В предлагаемом методе функции приложения трансформируются в нейронные сети, которые непосредственно записываются в персистентную память. В память сохранены матрицы весов, которые определяют какие нейроны будут входить в конкретную сеть и как будет работать эта нейронная сеть. В дальнейшем процессору требуется только определить входные данные алгоритма (или алгоритмов) и запустить вычислительный процесс внутри вычислительной памяти. [93] In the proposed method, application functions are transformed into neural networks, which are directly written to persistent memory. The memory stores weight matrices that determine which neurons will be included in a particular network and how that neural network will operate. The processor then only needs to determine the input data for the algorithm (or algorithms) and launch the computational process within the memory.
[94] После окончания вычислительных процессов, вычислительная память может известить процессор об окончании процесса вычислений посредством прерывания. Также, альтернативно, CPU может опрашивать вычислительную память с целью определения окончания вычислительных процессов.[94] After the completion of the computational processes, the computing memory may notify the processor of the completion of the computational process by means of an interrupt. Alternatively, the CPU may poll the computing memory to determine the completion of the computational processes.
[95] Ключевой момент предлагаемого способа состоит в том, что алгоритмы могут исполняться непосредственно в памяти посредством нейронных сетей, не используя ресурсы центрального процессора. Задачей центрального процессора будет только подготовка исходных данных, запуск вычислений в памяти и обработка результатов вычислений в памяти. Предлагаемая модель параллельных вычислений в памяти может существенно улучшить производительность вычислений, понизить затраты энергии на вычисления и высвободить ресурсы центрального процессора на организацию и координацию параллельных вычислений в памяти.[95] The key point of the proposed method is that algorithms can be executed directly in memory via neural networks, without using CPU resources. The CPU's only task is to prepare the initial data, launch computations in memory, and process the computation results in memory. The proposed model of parallel in-memory computing can significantly improve computational performance, reduce computational energy costs, and free up CPU resources for organizing and coordinating parallel in-memory computations.
[96] Представленные материалы заявки раскрывают предпочтительные примеры реализации технического решения и не должны трактоваться как ограничивающие иные, частные примеры его воплощения, не выходящие за пределы испрашиваемой правовой охраны, которые являются очевидными для специалистов соответствующей области техники.[96] The submitted application materials disclose preferred examples of the implementation of the technical solution and should not be interpreted as limiting other, particular examples of its implementation that do not go beyond the scope of the requested legal protection, which are obvious to specialists in the relevant field of technology.
Claims (12)
Related Parent Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| RU2024124704A Division RU2834855C1 (en) | 2024-08-23 | Method and system for executing program code |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| RU2851317C1 true RU2851317C1 (en) | 2025-11-24 |
Family
ID=
Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| RU2683690C1 (en) * | 2017-12-27 | 2019-04-01 | Публичное Акционерное Общество "Сбербанк России" (Пао Сбербанк) | Method and system for automatic generation of a program code for an enterprise data warehouse |
| RU2728497C1 (en) * | 2019-12-05 | 2020-07-29 | Общество с ограниченной ответственностью "Группа АйБи ТДС" | Method and system for determining belonging of software by its machine code |
| US20210263775A1 (en) * | 2020-02-21 | 2021-08-26 | Vk Investment Gmbh | Methods for executing computer executable instructions |
| US20230010147A1 (en) * | 2021-07-09 | 2023-01-12 | International Business Machines Corporation | Automated determination of accurate data schema |
| US20230418570A1 (en) * | 2020-11-23 | 2023-12-28 | Equifax Inc. | Constructing executable program code based on sequence codes |
Patent Citations (5)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| RU2683690C1 (en) * | 2017-12-27 | 2019-04-01 | Публичное Акционерное Общество "Сбербанк России" (Пао Сбербанк) | Method and system for automatic generation of a program code for an enterprise data warehouse |
| RU2728497C1 (en) * | 2019-12-05 | 2020-07-29 | Общество с ограниченной ответственностью "Группа АйБи ТДС" | Method and system for determining belonging of software by its machine code |
| US20210263775A1 (en) * | 2020-02-21 | 2021-08-26 | Vk Investment Gmbh | Methods for executing computer executable instructions |
| US20230418570A1 (en) * | 2020-11-23 | 2023-12-28 | Equifax Inc. | Constructing executable program code based on sequence codes |
| US20230010147A1 (en) * | 2021-07-09 | 2023-01-12 | International Business Machines Corporation | Automated determination of accurate data schema |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| Ghose et al. | Processing-in-memory: A workload-driven perspective | |
| US10204055B2 (en) | System and methods for expandably wide processor instructions | |
| US11669443B2 (en) | Data layout optimization on processing in memory architecture for executing neural network model | |
| Mirchandaney et al. | Principles of runtime support for parallel processors | |
| Nair | Evolution of memory architecture | |
| TW201923561A (en) | Scheduling tasks in a multi-threaded processor | |
| US11947821B2 (en) | Methods and systems for managing an accelerator's primary storage unit | |
| Ahmed et al. | A load balance multi-scheduling model for OpenCL kernel tasks in an integrated cluster | |
| US20250111217A1 (en) | Data layout conscious processing in memory architecture for executing neural network model | |
| US10838768B2 (en) | Method for optimizing memory access in a microprocessor including several logic cores upon resumption of executing an application, and computer implementing such a method | |
| US11372768B2 (en) | Methods and systems for fetching data for an accelerator | |
| KR102732122B1 (en) | Accelerator system for training deep neural network model using nand flash memory and operating method thereof | |
| CN116762068A (en) | Address mapping aware task allocation mechanism | |
| US20160147516A1 (en) | Execution of complex recursive algorithms | |
| RU2851317C1 (en) | Computer system for executing program code | |
| RU2848290C1 (en) | Computing system for executing program code using neural networks | |
| RU2834580C1 (en) | Method and system for executing program code using neural networks | |
| RU2834855C1 (en) | Method and system for executing program code | |
| Henkel et al. | Special session-non-volatile memories: Challenges and opportunities for embedded system architectures with focus on machine learning applications | |
| CN117348929A (en) | Instruction execution method, system controller and related products | |
| KR20150041539A (en) | Re-configurable processor and method for operating re-configurable processor | |
| CN115016993B (en) | Error cleaning method, device and computer equipment suitable for heterogeneous redundancy | |
| CN117348930A (en) | Instruction processing device, instruction execution method, system on chip and board card | |
| WO2022056656A1 (en) | Weights layout transformation assisted nested loops optimization for ai inference | |
| RU2829301C1 (en) | Data processing method and system |