interplane.Get Omega
Read in your language

ggml

[Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685)

Brought by drakestapleton

branch master Branches Tags History

ggml / src / ggml-opencl / kernels / embed_kernel.py

26 lines · 477 bytes Raw Blame History
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()