Automatic out-of-bound access prevention in GPU kernels executed in a managed environment

    公开(公告)号:US11288108B2

    公开(公告)日:2022-03-29

    申请号:US16701797

    申请日:2019-12-03

    Abstract: Techniques are provided for an automated method of adding out-of-bound access prevention in GPU kernels executed in a managed environment. In an embodiment, a system of computers compiles a GPU kernel code function that includes one or more array references that are memory address dependent. The system of computers compiles the kernel code function by generating a rewritten GPU kernel code module that includes, within the function signature of the rewritten GPU kernel code module, a respective array size parameter for each array reference of the one or more array references included in the GPU kernel code function. The system of computers further compiles the kernel code function by adding bounding protection instructions to the one or more potential out-of-bound access instructions in the rewritten GPU kernel code module. The potential out-of-bound access instructions comprise instructions that reference each respective array size parameter of the one or more array references. Afterwards, the rewritten GPU kernel code module is loaded in a virtual machine. Loading the rewritten GPU kernel code module in the virtual machine comprises modifying a host application to automatically transmit, from the host application, one or more input array size values. The one or more input array size values is referenced by the one or more potential out-of-bound-access instructions.

    SPECULATIVE OBJECT REPRESENTATION
    2.
    发明申请
    SPECULATIVE OBJECT REPRESENTATION 有权
    调查对象表示

    公开(公告)号:US20150113512A1

    公开(公告)日:2015-04-23

    申请号:US14061677

    申请日:2013-10-23

    CPC classification number: G06F9/45508 G06F8/41 G06F8/433 G06F8/443 G06F9/4552

    Abstract: A method for optimizing code includes receiving, by a compiler and from an interpreter, a code section representation including an object allocation, compiling, by the compiler, the code section representation into machine code with a compact allocated object of the object allocation, and triggering a deoptimization returning execution to the interpreter in response to an attempted access of the compact allocated object. The method further includes setting, by the interpreter and within the code section representation, a flag indicating that a new compact allocated object is required at a location of the attempted access, receiving, by the compiler, the code section representation including the flag, compiling, by the compiler and according to the flag, the code section representation into new machine code including the new compact allocated object, and executing the new machine code with the new compact allocated object.

    Abstract translation: 一种用于优化代码的方法包括由编译器和解释器接收包括对象分配的代码段表示,由编译器将代码段表示编译成具有对象分配的紧凑分配对象的机器代码,以及触发 响应于对紧凑分配对象的尝试访问而将执行返回到解释器的去优化。 该方法还包括由解释器在代码段表示内设置指示在尝试访问的位置需要新的紧凑分配对象的标志,由编译器接收包括标志的代码段表示,编译 ,由编译器根据标志,将代码段表示成包括新的紧凑分配对象的新机器代码,并用新的紧凑分配对象执行新的机器代码。

    Simulation-based code duplication

    公开(公告)号:US10338903B2

    公开(公告)日:2019-07-02

    申请号:US15927852

    申请日:2018-03-21

    Abstract: A method for analyzing a program may include generating an initial control flow graph (CFG) for the program, identifying merge blocks of the initial CFG, identifying predecessor-merge pairs based on identifying predecessor blocks for each merge block, simulating a duplication of each predecessor-merge pair, determining whether the duplication satisfies a precondition of each of a collection of optimizations, applying, in response to satisfying the precondition, the optimization to the duplication, and generating a simulation result for the predecessor-merge pair corresponding to the duplication. The simulation result may include the optimization and a benefit of applying the optimization to the duplication. The method may further include duplicating, in the initial CFG, a predecessor-merge pair based on the simulation result corresponding to the predecessor-merge pair.

    Self-optimizing interpreter and snapshot compilation
    4.
    发明授权
    Self-optimizing interpreter and snapshot compilation 有权
    自我优化解释器和快照编译

    公开(公告)号:US08930920B2

    公开(公告)日:2015-01-06

    申请号:US13731698

    申请日:2012-12-31

    CPC classification number: G06F9/45508 G06F8/41 G06F8/433 G06F8/443 G06F9/4552

    Abstract: A method for a compiler includes receiving, by the compiler and from an interpreter, a representation of a code section having a control path that changes the representation. The representation has profiling data, and the profiling data has a threshold. The method further includes performing, by the compiler and based on the threshold, a partial evaluation of the interpreter executing the representation, compiling, by the compiler, a machine code of the representation, with the control path replaced by a deoptimization point during the compilation of the machine code, triggering the deoptimization point during execution of the machine code, and returning execution to the interpreter based on the triggering.

    Abstract translation: 一种用于编译器的方法包括由编译器和解释器接收具有改变表示的控制路径的代码段的表示。 该表示具有分析数据,并且分析数据具有​​阈值。 该方法进一步包括由编译器和基于阈值执行执行该表示的解释器的部分评估,由编译器编译表示的机器代码,在编译期间将控制路径替换为去优化点 的机器代码,在执行机器代码期间触发去优化点,并且基于触发将执行返回到解释器。

    SIMULATION-BASED CODE DUPLICATION
    5.
    发明申请

    公开(公告)号:US20190272160A1

    公开(公告)日:2019-09-05

    申请号:US16413807

    申请日:2019-05-16

    Abstract: A method for analyzing a program may include generating an initial control flow graph (CFG) for the program, identifying merge blocks of the initial CFG, identifying predecessor-merge pairs based on identifying predecessor blocks for each merge block, simulating a duplication of each predecessor-merge pair, determining whether the duplication satisfies a precondition of each of a collection of optimizations, applying, in response to satisfying the precondition, the optimization to the duplication, and generating a simulation result for the predecessor-merge pair corresponding to the duplication. The simulation result may include the optimization and a benefit of applying the optimization to the duplication. The method may further include duplicating, in the initial CFG, a predecessor-merge pair based on the simulation result corresponding to the predecessor-merge pair.

    EAGER AND OPTIMISTIC EVALUATION OF PROMISES
    6.
    发明申请
    EAGER AND OPTIMISTIC EVALUATION OF PROMISES 有权
    EAGER和优惠评估

    公开(公告)号:US20160117157A1

    公开(公告)日:2016-04-28

    申请号:US14690592

    申请日:2015-04-20

    CPC classification number: G06F8/443 G06F8/41 G06F8/4441 G06F8/53

    Abstract: The invention relates to a method for generating executable code from application source code. The method steps include determining a programmatic expression using the application source code and determining a first value for the programmatic expression. The method steps further include compiling the programmatic expression into a first optimized code portion using the first value, an assumption, and an expression scope. The method steps further include executing the application source code. The method steps further include determining that the programmatic expression is modified outside of the expression scope, invalidating the assumption, and de-optimizing the first optimized code portion.

    Abstract translation: 本发明涉及从应用源代码生成可执行代码的方法。 所述方法步骤包括使用所述应用源代码来确定编程表达式并且确定所述编程表达式的第一值。 方法步骤还包括使用第一值,假设和表达范围将编程表达式编译成第一优化代码部分。 方法步骤还包括执行应用源代码。 所述方法步骤还包括确定所述编程表达式在所述表达范围之外被修改,使所述假设无效,以及对所述第一优化代码部分进行去优化。

    Speculative object representation
    7.
    发明授权
    Speculative object representation 有权
    投机对象表示

    公开(公告)号:US09235433B2

    公开(公告)日:2016-01-12

    申请号:US14061677

    申请日:2013-10-23

    CPC classification number: G06F9/45508 G06F8/41 G06F8/433 G06F8/443 G06F9/4552

    Abstract: A method for optimizing code includes receiving, by a compiler and from an interpreter, a code section representation including an object allocation, compiling, by the compiler, the code section representation into machine code with a compact allocated object of the object allocation, and triggering a deoptimization returning execution to the interpreter in response to an attempted access of the compact allocated object. The method further includes setting, by the interpreter and within the code section representation, a flag indicating that a new compact allocated object is required at a location of the attempted access, receiving, by the compiler, the code section representation including the flag, compiling, by the compiler and according to the flag, the code section representation into new machine code including the new compact allocated object, and executing the new machine code with the new compact allocated object.

    Abstract translation: 一种用于优化代码的方法包括由编译器和解释器接收包括对象分配的代码段表示,由编译器将代码段表示编译成具有对象分配的紧凑分配对象的机器代码,以及触发 响应于对紧凑分配对象的尝试访问而将执行返回到解释器的去优化。 该方法还包括由解释器在代码段表示内设置指示在尝试访问的位置需要新的紧凑分配对象的标志,由编译器接收包括标志的代码段表示,编译 ,由编译器根据标志,将代码段表示成包括新的紧凑分配对象的新机器代码,并用新的紧凑分配对象执行新的机器代码。

    COPY AVOIDANCE VIA STATIC ANALYSIS FOR DBMS QUERYING

    公开(公告)号:US20240273091A1

    公开(公告)日:2024-08-15

    申请号:US18589052

    申请日:2024-02-27

    CPC classification number: G06F16/2443 G06F16/217 G06F16/2219

    Abstract: In a computer embodiment, in a polyglot database management system (DBMS) that contains a guest language runtime environment, a database buffer is configured that the guest language runtime environment does not manage. In the polyglot DBMS, logic that is defined in a guest language is invoked to retrieve, into the database buffer, a value stored in a database in the polyglot DBMS. Compiling the logic causes semantic analyzing the logic to detect that usage of the retrieved value cannot occur after the retrieved value is overwritten in the database buffer. When detecting that such usage of the retrieved value cannot occur, the logic is executed without, after the retrieved value is overwritten in the database buffer, retaining a copy of the retrieved value in a memory region that the guest language runtime environment manages.

    Copy avoidance via static analysis for DBMS querying

    公开(公告)号:US11947531B1

    公开(公告)日:2024-04-02

    申请号:US18109781

    申请日:2023-02-14

    CPC classification number: G06F16/2443 G06F16/217 G06F16/2219

    Abstract: In a computer embodiment, in a polyglot database management system (DBMS) that contains a guest language runtime environment, a database buffer is configured that the guest language runtime environment does not manage. In the polyglot DBMS, logic that is defined in a guest language is invoked to retrieve, into the database buffer, a value stored in a database in the polyglot DBMS. Compiling the logic causes semantic analyzing the logic to detect that usage of the retrieved value cannot occur after the retrieved value is overwritten in the database buffer. When detecting that such usage of the retrieved value cannot occur, the logic is executed without, after the retrieved value is overwritten in the database buffer, retaining a copy of the retrieved value in a memory region that the guest language runtime environment manages.

    SIMULATION-BASED CODE DUPLICATION
    10.
    发明申请

    公开(公告)号:US20190012154A1

    公开(公告)日:2019-01-10

    申请号:US15927852

    申请日:2018-03-21

    CPC classification number: G06F8/4441 G06F8/41 G06F8/433 G06F8/443 G06F8/4435

    Abstract: A method for analyzing a program may include generating an initial control flow graph (CFG) for the program, identifying merge blocks of the initial CFG, identifying predecessor-merge pairs based on identifying predecessor blocks for each merge block, simulating a duplication of each predecessor-merge pair, determining whether the duplication satisfies a precondition of each of a collection of optimizations, applying, in response to satisfying the precondition, the optimization to the duplication, and generating a simulation result for the predecessor-merge pair corresponding to the duplication. The simulation result may include the optimization and a benefit of applying the optimization to the duplication. The method may further include duplicating, in the initial CFG, a predecessor-merge pair based on the simulation result corresponding to the predecessor-merge pair.

Patent Agency Ranking