Skip to content

Commit 04f73fc

Browse files
authored
XLA backend for Lc0 (#1949)
1 parent 3b9a87e commit 04f73fc

16 files changed

+5375
-0
lines changed

meson.build

+16
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,22 @@ if get_option('build_backends')
620620
endif
621621

622622

623+
## ~~~~~~~~
624+
## XLA
625+
## ~~~~~~~~
626+
if get_option('xla')
627+
files += [
628+
'src/neural/xla/hlo_builder.cc',
629+
'src/neural/xla/network_xla.cc',
630+
'src/neural/xla/onnx2hlo.cc',
631+
'src/neural/xla/print_hlo.cc',
632+
'src/neural/xla/pjrt.cc',
633+
'src/neural/xla/xla_runner.cc',
634+
]
635+
files += gen_proto_src.process('src/neural/xla/hlo.proto',
636+
preserve_path_from : meson.current_source_dir() + '/src/')
637+
deps += cc.find_library('dl', required: false)
638+
endif
623639

624640
endif # if get_option('build_backends')
625641

meson_options.txt

+5
Original file line numberDiff line numberDiff line change
@@ -187,3 +187,8 @@ option('onnx_include',
187187
type: 'string',
188188
value: '',
189189
description: 'Paths to ONNX runtime includes')
190+
191+
option('xla',
192+
type: 'boolean',
193+
value: false,
194+
description: 'Enable XLA backend')

scripts/compile_proto.py

+1
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@
6464
'package',
6565
'message',
6666
'optional',
67+
'required',
6768
'repeated',
6869
'enum',
6970
] + list(TYPES.keys())

0 commit comments

Comments
 (0)