Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
OpenDAS
text-generation-inference
Commits
68455353
Unverified
Commit
68455353
authored
Feb 15, 2023
by
OlivierDehaene
Committed by
GitHub
Feb 15, 2023
Browse files
feat(launcher): add disable_custom_kernels arg (#67)
parent
c5a4a1fa
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
0 deletions
+10
-0
launcher/src/main.rs
launcher/src/main.rs
+10
-0
No files found.
launcher/src/main.rs
View file @
68455353
...
@@ -47,6 +47,8 @@ struct Args {
...
@@ -47,6 +47,8 @@ struct Args {
#[clap(long,
env)]
#[clap(long,
env)]
weights_cache_override
:
Option
<
String
>
,
weights_cache_override
:
Option
<
String
>
,
#[clap(long,
env)]
#[clap(long,
env)]
disable_custom_kernels
:
bool
,
#[clap(long,
env)]
json_output
:
bool
,
json_output
:
bool
,
#[clap(long,
env)]
#[clap(long,
env)]
otlp_endpoint
:
Option
<
String
>
,
otlp_endpoint
:
Option
<
String
>
,
...
@@ -79,6 +81,7 @@ fn main() -> ExitCode {
...
@@ -79,6 +81,7 @@ fn main() -> ExitCode {
master_port
,
master_port
,
huggingface_hub_cache
,
huggingface_hub_cache
,
weights_cache_override
,
weights_cache_override
,
disable_custom_kernels
,
json_output
,
json_output
,
otlp_endpoint
,
otlp_endpoint
,
}
=
args
;
}
=
args
;
...
@@ -242,6 +245,7 @@ fn main() -> ExitCode {
...
@@ -242,6 +245,7 @@ fn main() -> ExitCode {
master_port
,
master_port
,
huggingface_hub_cache
,
huggingface_hub_cache
,
weights_cache_override
,
weights_cache_override
,
disable_custom_kernels
,
otlp_endpoint
,
otlp_endpoint
,
status_sender
,
status_sender
,
shutdown
,
shutdown
,
...
@@ -406,6 +410,7 @@ fn shard_manager(
...
@@ -406,6 +410,7 @@ fn shard_manager(
master_port
:
usize
,
master_port
:
usize
,
huggingface_hub_cache
:
Option
<
String
>
,
huggingface_hub_cache
:
Option
<
String
>
,
weights_cache_override
:
Option
<
String
>
,
weights_cache_override
:
Option
<
String
>
,
disable_custom_kernels
:
bool
,
otlp_endpoint
:
Option
<
String
>
,
otlp_endpoint
:
Option
<
String
>
,
status_sender
:
mpsc
::
Sender
<
ShardStatus
>
,
status_sender
:
mpsc
::
Sender
<
ShardStatus
>
,
shutdown
:
Arc
<
Mutex
<
bool
>>
,
shutdown
:
Arc
<
Mutex
<
bool
>>
,
...
@@ -474,6 +479,11 @@ fn shard_manager(
...
@@ -474,6 +479,11 @@ fn shard_manager(
));
));
};
};
// If disable_custom_kernels is true, pass it to the shard as an env var
if
disable_custom_kernels
{
env
.push
((
"DISABLE_CUSTOM_KERNELS"
.into
(),
"True"
.into
()))
}
// If the NCCL_SHM_DISABLE env var is set, pass it to the shard
// If the NCCL_SHM_DISABLE env var is set, pass it to the shard
// needed when running NCCL inside a docker container and when you can't increase shm size
// needed when running NCCL inside a docker container and when you can't increase shm size
if
let
Ok
(
nccl_shm_disalbe
)
=
env
::
var
(
"NCCL_SHM_DISABLE"
)
{
if
let
Ok
(
nccl_shm_disalbe
)
=
env
::
var
(
"NCCL_SHM_DISABLE"
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment