mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-05-30 23:18:20 +00:00
Support disabling training kernels as part of a reduced build (#6557)
This commit is contained in:
parent
e9d03983fc
commit
8f14b8bd9d
1 changed files with 4 additions and 1 deletions
|
|
@ -52,12 +52,15 @@ def get_kernel_registration_files(ort_root=None, include_cuda=False):
|
|||
|
||||
provider_path = ort_root + '/onnxruntime/core/providers/{ep}/{ep}_execution_provider.cc'
|
||||
contrib_provider_path = ort_root + '/onnxruntime/contrib_ops/{ep}/{ep}_contrib_kernels.cc'
|
||||
training_provider_path = ort_root + '/orttraining/orttraining/training_ops/{ep}/{ep}_training_kernels.cc'
|
||||
provider_paths = [provider_path.format(ep='cpu'),
|
||||
contrib_provider_path.format(ep='cpu')]
|
||||
contrib_provider_path.format(ep='cpu'),
|
||||
training_provider_path.format(ep='cpu')]
|
||||
|
||||
if include_cuda:
|
||||
provider_paths.append(provider_path.format(ep='cuda'))
|
||||
provider_paths.append(contrib_provider_path.format(ep='cuda'))
|
||||
provider_paths.append(training_provider_path.format(ep='cuda'))
|
||||
|
||||
provider_paths = [os.path.abspath(p) for p in provider_paths]
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue