# Copyright HeteroCL authors. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import heterocl as hcl

# from submodule import submodule # global import

target = "vhls"

hcl.init()


def main():
    A = hcl.placeholder((10, 10), name="A")
    B = hcl.placeholder((10, 10), name="B")

    def algo(A, B):
        from submodule import submodule  # this local import is required

        submodule(A)
        hcl.update(B, lambda *args: B[args] + A[args])

    s = hcl.create_schedule([A, B], func=algo, name="main")
    f = hcl.build(s, target=target, name="main")
    print(f)


if __name__ == "__main__":
    main()

cc0c71bf7121d5b1fce519ccf60799d87c410e32
<mask token>


def main():
    A = hcl.placeholder((10, 10), name='A')
    B = hcl.placeholder((10, 10), name='B')

    def algo(A, B):
        from submodule import submodule
        submodule(A)
        hcl.update(B, lambda *args: B[args] + A[args])
    s = hcl.create_schedule([A, B], func=algo, name='main')
    f = hcl.build(s, target=target, name='main')
    print(f)


<mask token>

<mask token>
hcl.init()


def main():
    A = hcl.placeholder((10, 10), name='A')
    B = hcl.placeholder((10, 10), name='B')

    def algo(A, B):
        from submodule import submodule
        submodule(A)
        hcl.update(B, lambda *args: B[args] + A[args])
    s = hcl.create_schedule([A, B], func=algo, name='main')
    f = hcl.build(s, target=target, name='main')
    print(f)


if __name__ == '__main__':
    main()

<mask token>
target = 'vhls'
hcl.init()


def main():
    A = hcl.placeholder((10, 10), name='A')
    B = hcl.placeholder((10, 10), name='B')

    def algo(A, B):
        from submodule import submodule
        submodule(A)
        hcl.update(B, lambda *args: B[args] + A[args])
    s = hcl.create_schedule([A, B], func=algo, name='main')
    f = hcl.build(s, target=target, name='main')
    print(f)


if __name__ == '__main__':
    main()

import heterocl as hcl
target = 'vhls'
hcl.init()


def main():
    A = hcl.placeholder((10, 10), name='A')
    B = hcl.placeholder((10, 10), name='B')

    def algo(A, B):
        from submodule import submodule
        submodule(A)
        hcl.update(B, lambda *args: B[args] + A[args])
    s = hcl.create_schedule([A, B], func=algo, name='main')
    f = hcl.build(s, target=target, name='main')
    print(f)


if __name__ == '__main__':
    main()

# Copyright HeteroCL authors. All Rights Reserved.
# SPDX-License-Identifier: Apache-2.0

import heterocl as hcl

# from submodule import submodule # global import

target = "vhls"

hcl.init()


def main():
    A = hcl.placeholder((10, 10), name="A")
    B = hcl.placeholder((10, 10), name="B")

    def algo(A, B):
        from submodule import submodule  # this local import is required

        submodule(A)
        hcl.update(B, lambda *args: B[args] + A[args])

    s = hcl.create_schedule([A, B], func=algo, name="main")
    f = hcl.build(s, target=target, name="main")
    print(f)


if __name__ == "__main__":
    main()
