junrushao1994 commented on PR #11846:
URL: https://github.com/apache/tvm/pull/11846#issuecomment-1164752083
Thanks @tkonolige!
> This PR broke the comma printing :(. `std::locale("")` is supposed to set
the locale to the users preference. Quoting `man 3 setlocale`:
>
> > If locale is an empty string, "", each part of the locale that
should be modified is set according to the environment variables. The details
are implementation-dependent. For glibc, first (regardless of category), the
environment variable LC_ALL is inspected, next the environment variable with
the same name as the category (see the table above), and finally the environment
> > variable LANG. The first existing environment variable is used. If its
value is not a valid locale specification, the locale is unchanged, and
setlocale() returns NULL.
>
> @yogurfrul The error you are getting seems like it may be caused by a
misconfiguration of your system. Is `zh_CN.UTF-8` in your `/etc/locale.gen`?
It's a bit unfortunate that it's harder to use the profiler if you are
speaking other languages, which as you suggested, could be misconfiguration of
system locale or anything else. As a previous "zh_CN.UTF-8" user back to the
time when I was using windows, I just would love to point out that it's just
very normal (like ~95% in people with CS degree) that people happen to figure
the system imperfectly.
If a non-English speaker has to go extra miles to use a subsystem of TVM, I
would argue that it would be less ideal case that we might want to compromise,
instead of saying straight "you are wrong". In our particular case, the
thousand separator is pretty easy to implement with pure C++ without dependency
to std::locale, I don't have strong opinion but would love to suggest if we
could consider more carefully about the possibility of using an approach that
TVM more approachable to users :-)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]