# US 2025/0156331 A1 · Apparatus and method for molecular dynamics simulation

> Agents: this data is available as JSON from the patentgrep API and MCP server — see https://patentgrep.com/llms.txt

- Number: US 2025/0156331 A1
- Document ID: US20250156331A1
- Status: Published application
- Kind: A1
- Application number: 18/944,463
- Filed: 2024-11-12
- Published: 2025-05-15
- Earliest claimed: 2023-11-13
- Assignees: Samsung Electronics Co., Ltd.
- Applicants: Samsung Electronics Co., Ltd.
- Inventors: Zhen ZHANG; Jiali PANG; Xiaohui SU; Lin CHEN; Vasyltsov IHOR
- Web page: https://patentgrep.com/patent/US20250156331A1

## CPC

- G06F 12/0875: with dedicated cache, e.g. instruction or stack
- G06F 2212/60: Details of cache memory
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)

## Abstract

Disclosed is an apparatus and method. The method includes generating dispatchable streams and binding the dispatchable streams one-to-one to cache slices, where the cache slices are pre-partitioned from an accelerated cache, and, for each of dispatchable streams binding a dispatchable kernel function, determined for a corresponding dispatchable stream, to the corresponding dispatchable stream, for a first cache slice, of the cache slices, first duplicating the dispatchable kernel function to the first cache slice and starting the first duplicated dispatchable kernel function with respect to the first cache slice, and for a second cache slice, of the cache slices, second duplicating the dispatchable kernel function to the second cache slice and starting the second duplicated dispatchable kernel function with respect to the second cache slice, wherein the starting of the first duplicated dispatchable kernel function is performed asynchronously with the starting of the second duplicated dispatchable kernel function.

## Claims

### Claim 1

A processor-implemented method, the method comprising:
generating a plurality of dispatchable streams and binding the plurality of dispatchable streams one-to-one to a plurality of cache slices, where the plurality of cache slices are pre-partitioned from an accelerated cache; and
for each of the plurality of dispatchable streams:
binding a dispatchable kernel function, determined for a corresponding dispatchable stream, to the corresponding dispatchable stream;
for a first cache slice, of the plurality of cache slices, first duplicating the bound dispatchable kernel function to the first cache slice and starting the first duplicated bound dispatchable kernel function with respect to the first cache slice; and
for a second cache slice, of the plurality of cache slices, second duplicating the bound dispatchable kernel function to the second cache slice and starting the second duplicated bound dispatchable kernel function with respect to the second cache slice,
wherein the starting of the first duplicated bound dispatchable kernel function is performed asynchronously with the starting of the second duplicated bound dispatchable kernel function.

### Claim 2 (depends on 1)

The method of claim 1, wherein the accelerated cache includes molecular dynamics (MD) data, and the dispatchable kernel function is a kernel function among a plurality of kernel functions of a MD simulation.

### Claim 3 (depends on 2)

The method of claim 2, further comprising:
determining a size of each dispatchable kernel function among the plurality of kernel functions; and
performing the pre-partitioning of the accelerated cache into the plurality of cache slices based on a determined largest size among the determined sizes.

### Claim 4 (depends on 3)

The method of claim 3, wherein a total number of the plurality of dispatchable streams is same as a total number of the plurality of cache slices.

### Claim 5 (depends on 1)

The method of claim 1, wherein the binding of the dispatchable kernel function comprises:
collecting all dispatchable kernel functions determined for the corresponding dispatchable stream and sequentially arranging the collected all dispatchable kernel functions in an execution order; and
binding each of the collected all dispatchable kernel functions to the corresponding dispatchable stream sequentially according to the sequential arranging.

### Claim 6 (depends on 1)

The method of claim 1, further comprising:
generating a first event object for the first cache slice indicating whether the first cache slice is occupied by the first duplicated bound dispatchable kernel function; and
generating a second event object for the second cache slices indicating whether the second cache slice is occupied by the second duplicated bound dispatchable kernel function.

### Claim 7 (depends on 6)

The method of claim 6,
wherein the binding of the dispatchable kernel function comprises binding each of a plurality of dispatchable kernel functions, determined for the corresponding dispatchable stream, to the corresponding dispatchable stream according to sequential execution order of the plurality of dispatchable kernel functions, and
wherein the method further comprises, in response to the first cache slice being determined unoccupied based on the first event object indicating that the first cache slice is not occupied by the first duplicated bound dispatchable kernel function, duplicating, to the first cache slice, an unexecuted dispatchable kernel function that is directly subsequent to the first duplicated bound dispatchable kernel function in the sequential execution order of the plurality of dispatchable kernel functions.

### Claim 8 (depends on 7)

The method of claim 7, wherein the unexecuted dispatchable kernel function that is directly subsequent to the first duplicated bound dispatchable kernel function in the sequential execution order of the plurality of dispatchable kernel function is determined at a very front of all remaining unexecuted dispatchable kernel functions, among the plurality of dispatchable kernel function, in a pageable memory, and
wherein the duplicating of the unexecuted dispatchable kernel function includes copying the unexecuted dispatchable kernel function from the pageable memory to a page-pinned memory, and duplicating, to the cache slice, the copied unexecuted dispatchable kernel function.

### Claim 9 (depends on 7)

The method of claim 7, further comprising:
marking the first event object of the first cache slice as being occupied in response to the duplicating, to the first cache slice, of the unexecuted dispatchable kernel function; and
marking the first event object of the first cache slice as unoccupied in response to completion of an execution of the first duplicated bound dispatchable kernel function in response to the starting of the first duplicated bound dispatchable kernel function.

### Claim 10 (depends on 1)

The method of claim 1, wherein the starting of the second duplicated bound dispatchable kernel function is performed in parallel with an execution of the first duplicated bound dispatchable kernel function in response to the starting of the first duplicated bound dispatchable kernel function.

### Claim 11 (depends on 1)

A non-transitory computer-readable storage medium storing instructions that, when executed by a processor, cause the processor to perform the method of claim 1.

### Claim 12

An apparatus, the apparatus comprising:
one or more processors configured to:
generate a plurality of dispatchable streams and bind the plurality of dispatchable streams one-to-one to a plurality of cache slices, where the plurality of cache slices are pre-partitioned from an accelerated cache; and
for each of the plurality of dispatchable streams:
bind a dispatchable kernel function, determined for a corresponding dispatchable stream, to the corresponding dispatchable stream;
for a first cache slice, of the plurality of cache slices, perform a first duplicating of the bound dispatchable kernel function to the first cache slice and a starting of the first duplicated bound dispatchable kernel function with respect to the first cache slice; and
for a second cache slice, of the plurality of cache slices, perform a second duplicating of the bound dispatchable kernel function to the second cache slice and a starting of the second duplicated bound dispatchable kernel function with respect to the second cache slice,
wherein the starting of the first duplicated bound dispatchable kernel function is performed asynchronously with the starting of the second duplicated bound dispatchable kernel function.

### Claim 13 (depends on 12)

The apparatus of claim 12, wherein the accelerated cache includes molecular dynamics (MD) data, and the dispatchable kernel function is a kernel function among a plurality of kernel functions of a MD simulation.

### Claim 14 (depends on 13)

The apparatus of claim 13, wherein the one or more processors are further configured to:
determine a size of each dispatchable kernel function among the plurality of kernel functions; and
perform the pre-partitioning of the accelerated cache into the plurality of cache slices based on a determined largest size among the determined sizes.

### Claim 15 (depends on 14)

The apparatus of claim 14, wherein a total number of the plurality of dispatchable streams is same as a total number of the plurality of cache slices.

### Claim 16 (depends on 12)

The apparatus of claim 12, wherein, for the binding of the dispatchable kernel function, the one or more processors are configured to:
collect all dispatchable kernel functions determined for the corresponding dispatchable stream and sequentially arrange the collected all dispatchable kernel functions in an execution order; and
bind each of the collected all dispatchable kernel functions to the corresponding dispatchable stream sequentially according to the sequential arranging.

### Claim 17 (depends on 12)

The apparatus of claim 12, wherein the one or more processors are further configured to:
generate a first event object for the first cache slice indicating whether the first cache slice is occupied by the first duplicated bound dispatchable kernel function; and
generate a second event object for the second cache slices indicating whether the second cache slice is occupied by the second duplicated bound dispatchable kernel function.

### Claim 18 (depends on 17)

The apparatus of claim 17,
wherein, for the binding of the dispatchable kernel function, the one or more processors are configured to bind each of a plurality of dispatchable kernel functions, determined for the corresponding dispatchable stream, to the corresponding dispatchable stream according to sequential execution order of the plurality of dispatchable kernel functions, and
wherein the one or more processors are further configured to, in response to the first cache slice being determined unoccupied based on the first event object indicating that the first cache slice is not occupied by the first duplicated bound dispatchable kernel function, duplicate, to the first cache slice, an unexecuted dispatchable kernel function that is directly subsequent to the first duplicated bound dispatchable kernel function in the sequential execution order of the plurality of dispatchable kernel functions.

### Claim 19 (depends on 18)

The apparatus of claim 18, wherein the unexecuted dispatchable kernel function that is directly subsequent to the first duplicated bound dispatchable kernel function in the sequential execution order of the plurality of dispatchable kernel function is determined at a very front of all remaining unexecuted dispatchable kernel functions, among the plurality of dispatchable kernel function, in a pageable memory, and
wherein, for the duplicating of the unexecuted dispatchable kernel function, the one or more processors are configured to copy the unexecuted dispatchable kernel function from the pageable memory to a page-pinned memory, and duplicate, to the cache slice, the copied unexecuted dispatchable kernel function.

### Claim 20 (depends on 18)

The apparatus of claim 18, wherein the one or more processors are further configured to:
mark the first event object of the first cache slice as occupied in response to performance of the duplicating, to the first cache slice, of the unexecuted dispatchable kernel function; and
mark the first event object of the first cache slice as unoccupied in response to completion of an execution of the first duplicated bound dispatchable kernel function in response to the starting of the first duplicated bound dispatchable kernel function.

### Claim 21 (depends on 12)

The apparatus of claim 12, wherein the one or more processors are configured to perform the starting of the second duplicated bound dispatchable kernel function in parallel with an execution of the first duplicated bound dispatchable kernel function that corresponds to the starting of the first duplicated bound dispatchable kernel function.
