Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/ggml/blob/master/src/ggml-opencl/kernels/embed_kernel.py # ggml [Ported from github.com/ggml-org/ggml] docs : sync ggml_type enum in gguf.md (#1685) Brought by drakestapleton Sign in to star 0 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `master` Branches Tags History `ggml / src / ggml-opencl / kernels / embed_kernel.py` 26 lines ยท 477 bytes Raw Blame History 1 # 2 3 import sys 4 import logging 5 logger = logging.getLogger("opencl-embed-kernel") 6 7 8 def main(): 9 logging.basicConfig(level=logging.INFO) 10 11 if len(sys.argv) != 3: 12 logger.info("Usage: python embed_kernel.py ") 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 25 if __name__ == "__main__": 26 main()