Skip to content

Commit

Permalink
XLA backend for Lc0 (LeelaChessZero#1949)
Browse files Browse the repository at this point in the history
  • Loading branch information
mooskagh authored Feb 24, 2024
1 parent 3b9a87e commit 04f73fc
Show file tree
Hide file tree
Showing 16 changed files with 5,375 additions and 0 deletions.
16 changes: 16 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -620,6 +620,22 @@ if get_option('build_backends')
endif


## ~~~~~~~~
## XLA
## ~~~~~~~~
if get_option('xla')
files += [
'src/neural/xla/hlo_builder.cc',
'src/neural/xla/network_xla.cc',
'src/neural/xla/onnx2hlo.cc',
'src/neural/xla/print_hlo.cc',
'src/neural/xla/pjrt.cc',
'src/neural/xla/xla_runner.cc',
]
files += gen_proto_src.process('src/neural/xla/hlo.proto',
preserve_path_from : meson.current_source_dir() + '/src/')
deps += cc.find_library('dl', required: false)
endif

endif # if get_option('build_backends')

Expand Down
5 changes: 5 additions & 0 deletions meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -187,3 +187,8 @@ option('onnx_include',
type: 'string',
value: '',
description: 'Paths to ONNX runtime includes')

option('xla',
type: 'boolean',
value: false,
description: 'Enable XLA backend')
1 change: 1 addition & 0 deletions scripts/compile_proto.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
'package',
'message',
'optional',
'required',
'repeated',
'enum',
] + list(TYPES.keys())
Expand Down
Loading

0 comments on commit 04f73fc

Please sign in to comment.