# US 2026/0244836 A1 · Systems and methods for hardware acceleration of masking and normalizing data with a triangular input mask

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

- Number: US 2026/0244836 A1
- Document ID: US20260244836A1
- Status: Published application
- Kind: A1
- Application number: 19/560,779
- Filed: 2026-03-09
- Published: 2026-08-20
- Earliest claimed: 2022-05-23
- Assignees: Microsoft Technology Licensing, LLC
- Applicants: Microsoft Technology Licensing, LLC
- Inventors: Jinwen XI
- Web page: https://patentgrep.com/patent/US20260244836A1

## CPC

- G06F 30/331: with hardware acceleration, e.g. by using field programmable gate array [FPGA] or emulation
- G06N 3/063: using electronic means
- G06F 9/30029: {Logical and Boolean instructions, e.g. XOR, NOT}
- G06F 18/2155: {characterised by the incorporation of unlabelled data, e.g. multiple instance learning [MIL], semi-supervised techniques using expectation-maximisation [EM] or naïve labelling}
- G06N 3/048: Activation functions
- G06F: ELECTRIC DIGITAL DATA PROCESSING (computer systems based on specific computational models G06N)
- G06N: COMPUTING ARRANGEMENTS BASED ON SPECIFIC COMPUTATIONAL MODELS

## Abstract

A field programmable gate array including a configurable interconnect fabric connecting logic blocks implementing a circuit to: receive input data including data values organized into rows and columns, each row having N data values; select R[i] unmasked data values of a row of the input data in accordance with a mask and an index i of the row; select N−R[i] unmasked data values of another row of the input data in accordance with the mask and an index of the another row; merge the R[i] unmasked data values of the row and the N−R[i] data values of the another row into a combined data vector of N data values; and compute R[i] normalized values based on the R[i] unmasked data values of the combined data vector and N−R[i] normalized values based on the N−R[i] data values of the combined data vector to generate N normalized data values.

## Claims

### Claim 1

(canceled)

### Claim 2

A field programmable gate array (FPGA) comprising a configurable interconnect fabric connecting a plurality of logic blocks, the configurable interconnect fabric and the logic blocks being configured to implement a mask-normalize circuit comprising:
a memory storing training data having N rows;
a first local masking block configured to read row m of the training data from the memory and apply a first local mask to row m;
a second local masking block configured to read row N−m−2 of the training data from the memory and apply a second local mask to row N−m−2;
a row combiner configured to combine an output of the first local masking block and the second local masking block to generate a combined data vector;
a data normalization circuit configured to normalize values of the combined data vector based on a maximum value in the combined data vector to compute a combined normalized data vector; and
a row splitting and padding circuit configured to split the combined normalized data vector into a first row m of an output and a second row N−m−2 of the output and to store the first row m of the output and the second row N−m−2 of the output in the memory.

### Claim 3 (depends on 2)

The FPGA of claim 2, wherein the memory is a multi-port block memory of the FPGA comprising a first port and a second port, and
wherein the first local masking block and the second local masking block are configured to read from the multi-port block memory in parallel via the first port and the second port, respectively.

### Claim 4 (depends on 2)

The FPGA of claim 2, wherein the first local masking block performs a first bitwise AND operation between a first local mask and row m, and
wherein the second local masking block performs a second bitwise AND operation between a second local mask and row N−m−2.

### Claim 5 (depends on 4)

The FPGA of claim 4, wherein the first local mask and the second local mask implement an upper triangular attention mask.

### Claim 6 (depends on 2)

The FPGA of claim 2, wherein the data normalization circuit comprises:
a reduce-max circuit configured to compute the maximum value in the combined data vector;
a vector subtraction circuit configured to subtract the maximum value from each value in the combined data vector;
a vector multiplier circuit configured to multiply each value output by the vector subtraction circuit by log2 e; and
a vector exponential-by-two circuit configured to compute the exponential, base 2, of each value output by the vector multiplier circuit.

### Claim 7 (depends on 6)

The FPGA of claim 6, further comprising a first-in-first-out (FIFO) circuit configured to buffer the combined data vector while the reduce-max circuit computes the maximum value in the combined data vector.

### Claim 8 (depends on 6)

The FPGA of claim 6, wherein the data normalization circuit further comprises:
a first reduce-add circuit comprising a first accumulator configured to compute a first sum of a first sub-vector of the output of the exponential-by-two circuit;
a second reduce-add circuit comprising a second accumulator configured to compute a second sum of a second sub-vector of the output of the exponential-by-two circuit in parallel with the first reduce-add circuit;
a first reciprocal circuit configured to compute a first reciprocal of the first sum;
a second reciprocal circuit configured to compute a second reciprocal of the second sum; and
a second vector multiplier configured to multiply values of the output of the exponential-by-two circuit by the first reciprocal or the second reciprocal, selected by a multiplexer based on a column index of the output of the exponential-by-two circuit.

### Claim 9 (depends on 8)

The FPGA of claim 8, wherein the data normalization circuit further comprises a second FIFO configured to buffer the output of the exponential-by-two circuit while the first reciprocal and the second reciprocal are computed by the first reduce-add circuit, the first reciprocal circuit, the second reduce-add circuit, and the second reciprocal circuit.

### Claim 10

A method for accelerating computations in a field programmable gate array (FPGA) comprising a configurable interconnect fabric connecting a plurality of logic blocks, the method comprising:
reading a first data vector and a second data vector from a memory, the first data vector corresponding to an m-th row among N rows of training data and the second data vector corresponding to an N−m−2-nd row of the training data;
applying a first mask corresponding to the m-th row to the first data vector to compute a first masked row in parallel with applying a second mask corresponding to the N−m−2-nd row to the second data vector to compute a second masked row;
combining the first masked row and the second masked row at non-overlapping positions to generate a combined data vector;
normalizing values of the combined data vector based on a maximum value in the combined data vector to compute a combined normalized data vector; and
splitting the combined normalized data vector into a m-th row of an output and a N−m−2-nd row of the output and to store the m-th row of the output and the N−m−2-nd row of the output in the memory.

### Claim 11 (depends on 10)

The method of claim 10, wherein the memory is a multi-port memory comprising a first port and a second port, and
wherein the first data vector and the second data vector are read in parallel through the first port and the second port, respectively.

### Claim 12 (depends on 10)

The method of claim 10, wherein normalizing the values of the combined data vector comprises:
subtracting the maximum value from each value of the combined data vector to compute a plurality of shifted data values;
multiplying each of the plurality of shifted data values by log2 e to compute a plurality of scaled data values;
computing an exponential, base 2, of each of the scaled data values to compute a first sub-vector of exponentials of shifted values and a second sub-vector of exponentials of shifted values;
computing a first sum of the first sub-vector and a second sum of the second sub-vector; and
dividing the first sub-vector by the first sum and the second sub-vector by the second sum to generate the combined normalized data vector.

### Claim 13 (depends on 12)

The method of claim 12, wherein the first sum and the second sum are computed in parallel.

### Claim 14 (depends on 10)

The method of claim 10, wherein splitting the combined normalized data vector further comprises padding a first sub-vector of the combined normalized data to a first vector of N values and padding a second sub-vector of the combined normalized to a second vector of N values.

### Claim 15

Computer storage media storing a configuration file, the configuration file specifying a configuration of a field programmable gate array (FPGA) comprising a configurable interconnect fabric and a plurality of logic blocks, where an FPGA configured based on the configuration file comprises logic blocks, connected by the configurable interconnect fabric, implementing a mask-normalize circuit comprising configured to implement a mask-normalize circuit comprising:
a memory configured to store training data having N rows;
a first local masking block configured to read row m of the training data from the memory and apply a first local mask to row m;
a second local masking block configured to read row N−m−2 of the training data from the memory and apply a second local mask to row N−m−2;
a row combiner configured to combine an output of the first local masking block and the second local masking block to generate a combined data vector;
a data normalization circuit configured to normalize values of the combined data vector based on a maximum value in the combined data vector to compute a combined normalized data vector; and
a row splitting and padding circuit configured to split the combined normalized data vector into a first row m of an output and a second row N−m−2 of the output and to store the first row m of the output and the second row N−m−2 of the output in the memory.

### Claim 16 (depends on 15)

The computer storage media of claim 15, wherein the memory is a multi-port block memory of the FPGA comprising a first port and a second port, and
wherein the first local masking block and the second local masking block are configured to read from the multi-port block memory in parallel via the first port and the second port, respectively.

### Claim 17 (depends on 15)

The computer storage media of claim 15, wherein the first local masking block performs a first bitwise AND operation between a first local mask and row m, and
wherein the second local masking block performs a second bitwise AND operation between a second local mask and row N−m−2.

### Claim 18 (depends on 15)

The computer storage media of claim 15, wherein the data normalization circuit comprises:
a reduce-max circuit configured to compute the maximum value in the combined data vector;
a vector subtraction circuit configured to subtract the maximum value from each value in the combined data vector;
a vector multiplier circuit configured to multiply each values output by the vector subtraction circuit by log2 e; and
a vector exponential-by-two circuit configured to compute the exponential, base 2, of each of the values output by the vector multiplier circuit.

### Claim 19 (depends on 18)

The computer storage media of claim 18, wherein the data normalization circuit further comprises: a first-in-first-out (FIFO) circuit configured to buffer the combined data vector while the reduce-max circuit computes the maximum value in the combined data vector.

### Claim 20 (depends on 18)

The computer storage media of claim 18, wherein the data normalization circuit further comprises:
a first reduce-add circuit comprising a first accumulator configured to compute a first sum of a first sub-vector of the output of the exponential-by-two circuit;
a second reduce-add circuit comprising a second accumulator configured to compute a second sum of a second sub-vector of the output of the exponential-by-two circuit in parallel with the first reduce-add circuit;
a first reciprocal circuit configured to compute a first reciprocal of the first sum;
a second reciprocal circuit configured to compute a second reciprocal of the second sum; and
a second vector multiplier configured to multiply values of the output of the exponential-by-two circuit by the first reciprocal or the second reciprocal, selected by a multiplexer based on a column index of the output of the exponential-by-two circuit.

### Claim 21 (depends on 20)

The computer storage media of claim 20, wherein the data normalization circuit further comprises:
a second FIFO configured to buffer the output of the exponential-by-two circuit while the first reciprocal and the second reciprocal are computed by the first reduce-add circuit, the first reciprocal circuit, the second reduce-add circuit, and the second reciprocal circuit.
