char-fork/llama.cpp

git clone https://git.t4t.associates/char-fork/llama.cpp

lhezIntroducing experimental OpenCL backend with support for Qualcomm Adreno GPUs (#10693)a76c56fa1

char/aliceai-t5-moe
477 B26 linesraw
1#
2
3import sys
4import logging
5logger = logging.getLogger("opencl-embed-kernel")
6
7
8def main():
9    logging.basicConfig(level=logging.INFO)
10
11    if len(sys.argv) != 3:
12        logger.info("Usage: python embed_kernel.py <input_file> <output_file>")
13        sys.exit(1)
14
15    ifile = open(sys.argv[1], "r")
16    ofile = open(sys.argv[2], "w")
17
18    for i in ifile:
19        ofile.write('R"({})"\n'.format(i))
20
21    ifile.close()
22    ofile.close()
23
24
25if __name__ == "__main__":
26    main()