Skip to content

Conversation

@luitjens
Copy link
Contributor

Don't build for Tegra sm_XX versions on x86/ppc and vice versa; allow…

--cuda-arch overrides to have multiple versions

… --cuda-arch overrides to have multiple versions
}

function read_value {
local val=`expr "X$1" : '[^=]*=\(.*\)'`;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you explain the purpose of this change please? I wish this read_value function were documented. This expr thing is very obscure.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking closely at this it appears the difference is $* would allow a multi-word value.

For example:
x=read_value foo bar

In the previous code this would set x to "foo".

In the new code this would set x to "foo bar".

Why is this important?

We use this in read_dirname. Imagine the case where your directory has a space:

CUDATKDIR=read_dirname $1

Imagine the CUDATKDIR sat at "/usr/local/cuda 10.1"

The previous code would set CUDATKDIR to /usr/local/cuda

@luitjens
Copy link
Contributor Author

@cliffwoolley these were changes made by cliff. Adding him so he can comment as to why the change was needed.

@jtrmal
Copy link
Contributor

jtrmal commented Mar 26, 2019 via email

@luitjens
Copy link
Contributor Author

CUDATKDIR=read_dirname "$1" ?

On Tue, Mar 26, 2019 at 15:30 Justin Luitjens @.> wrote: @.* commented on this pull request. ------------------------------ In src/configure <#3171 (comment)>: > @@ -118,7 +118,7 @@ function rel2abs { } function read_value { - local val=expr "X$1" : '[^=]*=\(.*\)'; Looking closely at this it appears the difference is $* would allow a multi-word value. For example: x=read_value foo bar In the previous code this would set x to "foo". In the new code this would set x to "foo bar". Why is this important? We use this in read_dirname. Imagine the case where your directory has a space: CUDATKDIR=read_dirname $1 Imagine the CUDATKDIR sat at "/usr/local/cuda 10.1" The previous code would set CUDATKDIR to /usr/local/cuda — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#3171 (comment)>, or mute the thread https://github.com/notifications/unsubscribe-auth/AKisX7-u4xQZ_2oD2QXAyhF23Kl-dXTuks5vanH9gaJpZM4cMEH0 .

That would probably work too. Not sure it is any better that way as we have lots of places that have $1 without quotes.

@danpovey
Copy link
Contributor

danpovey commented Mar 26, 2019 via email

@luitjens
Copy link
Contributor Author

luitjens commented Mar 26, 2019 via email

@danpovey
Copy link
Contributor

danpovey commented Mar 26, 2019 via email

@luitjens
Copy link
Contributor Author

luitjens commented Mar 26, 2019 via email

@luitjens
Copy link
Contributor Author

luitjens commented Mar 26, 2019 via email

@danpovey
Copy link
Contributor

danpovey commented Mar 26, 2019 via email

@danpovey danpovey merged commit f9828e9 into kaldi-asr:master Mar 27, 2019
@luitjens luitjens deleted the tegra-build-fixes branch March 29, 2019 15:34
danpovey pushed a commit to danpovey/kaldi that referenced this pull request Jun 19, 2019
…a; allow --cuda-arch overrides to have multiple versions (kaldi-asr#3171)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

4 participants