You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by GitBox <gi...@apache.org> on 2021/08/10 15:06:25 UTC

[GitHub] [incubator-mxnet] mozga-intel opened a new pull request #20509: Remove static keyword from a thread_local std::unordered_map

mozga-intel opened a new pull request #20509:
URL: https://github.com/apache/incubator-mxnet/pull/20509


   ## Description ##
   Following the [doc](https://timsong-cpp.github.io/cppwp/n3337/dcl.stc), 
   
   > The thread_local specifier indicates that the named entity has thread storage duration ([basic.stc.thread]). It shall be applied only to the names of variables of namespace or block scope and to the names of static data members. When thread_local is applied to a variable of block scope the storage-class-specifier static is implied if it does not appear explicitly. 
   
   ## Checklist ##
   ### Essentials ###
   - [ ] PR's title starts with a category (e.g. [BUGFIX], [MODEL], [TUTORIAL], [FEATURE], [DOC], etc)
   - [ ] Changes are complete (i.e. I finished coding on this PR)
   - [ ] All changes have test coverage
   - [ ] Code is well-documented
   
   ### Changes ###
   - [ ] Feature1, tests, (and when applicable, API doc)
   - [ ] Feature2, tests, (and when applicable, API doc)
   
   ## Comments ##
   - If this change is a backward incompatible change, why must this change be made.
   - Interesting edge cases to note here
   


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mozga-intel edited a comment on pull request #20509: Remove static keyword from a thread_local std::unordered_map

Posted by GitBox <gi...@apache.org>.
mozga-intel edited a comment on pull request #20509:
URL: https://github.com/apache/incubator-mxnet/pull/20509#issuecomment-922949830


   A well-known static keyword is sufficient and is not an error mistake on many counts. I've checked it: if a thread_local specifier declares the variables to have storage duration, then the results show that scope is LOCAL: 
   ```cpp
    40:  0000000000000070   1 TLS       LOCAL   DEFAULT   20 _ZGVZN1A5HELLOEvE4thread_local_var_local (*)
    42:  0000000000000038   56 TLS      LOCAL   DEFAULT   20 _ZZN1A5HELLOEvE4thread_local_var_local (*)
    79:  0000000000400b30   24 FUNC     WEAK    HIDDEN    14 _ZTW5thread_local_var_global
    114: 0000000000000000   56 TLS      GLOBAL  DEFAULT   20 thread_local_var_global
    124: 0000000000400b00   36 FUNC     GLOBAL  DEFAULT   14 _ZTH5thread_local_var_global
   ```
   The latter, the expression relates to another topic: if the compiler version is not greater than  < X, then implementation of a thread_local is used - It means that internal function is not used. Removing static keywords can affect a UT. Due to it, that modification can not displace static keywords in the second case.
   


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20509: Remove static keyword from a thread_local std::unordered_map

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20509:
URL: https://github.com/apache/incubator-mxnet/pull/20509#issuecomment-896164254


   Jenkins CI successfully triggered : [website]


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mozga-intel commented on pull request #20509: Remove static keyword from a thread_local std::unordered_map

Posted by GitBox <gi...@apache.org>.
mozga-intel commented on pull request #20509:
URL: https://github.com/apache/incubator-mxnet/pull/20509#issuecomment-896164167


   @mxnet-bot run ci [website]


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mozga-intel closed pull request #20509: Remove static keyword from a thread_local std::unordered_map

Posted by GitBox <gi...@apache.org>.
mozga-intel closed pull request #20509:
URL: https://github.com/apache/incubator-mxnet/pull/20509


   


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mozga-intel commented on pull request #20509: Remove static keyword from a thread_local std::unordered_map

Posted by GitBox <gi...@apache.org>.
mozga-intel commented on pull request #20509:
URL: https://github.com/apache/incubator-mxnet/pull/20509#issuecomment-922949830


   A well-known static keyword is sufficient and is not an error mistake on many counts. I've checked it: if a thread_local specifier declares the variable to have storage duration, then the results show that scope is LOCAL: 
   ```cpp
    40:  0000000000000070   1 TLS       LOCAL   DEFAULT   20 _ZGVZN1A5HELLOEvE4thread_local_var_local (*)
    42:  0000000000000038   56 TLS      LOCAL   DEFAULT   20 _ZZN1A5HELLOEvE4thread_local_var_local (*)
    79:  0000000000400b30   24 FUNC     WEAK    HIDDEN    14 _ZTW5thread_local_var_global
    114: 0000000000000000   56 TLS      GLOBAL  DEFAULT   20 thread_local_var_global
    124: 0000000000400b00   36 FUNC     GLOBAL  DEFAULT   14 _ZTH5thread_local_var_global
   ```
   The latter, the expression relates to another topic: if the compiler version is not greater than  < X, then implementation of a thread_local is used - It means that internal function is not used. Removing static keywords can affect a UT. Due to it, that modification can not displace static keywords in the second case.
   


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mxnet-bot commented on pull request #20509: Remove static keyword from a thread_local std::unordered_map

Posted by GitBox <gi...@apache.org>.
mxnet-bot commented on pull request #20509:
URL: https://github.com/apache/incubator-mxnet/pull/20509#issuecomment-896109805


   Hey @mozga-intel , Thanks for submitting the PR 
   All tests are already queued to run once. If tests fail, you can trigger one or more tests again with the following commands: 
   - To trigger all jobs: @mxnet-bot run ci [all] 
   - To trigger specific jobs: @mxnet-bot run ci [job1, job2] 
   *** 
   **CI supported jobs**: [clang, centos-cpu, website, miscellaneous, unix-cpu, unix-gpu, windows-cpu, centos-gpu, edge, sanity, windows-gpu]
   *** 
   _Note_: 
    Only following 3 categories can trigger CI :PR Author, MXNet Committer, Jenkins Admin. 
   All CI tests must pass before the PR can be merged. 
   


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



[GitHub] [incubator-mxnet] mozga-intel closed pull request #20509: Remove static keyword from a thread_local std::unordered_map

Posted by GitBox <gi...@apache.org>.
mozga-intel closed pull request #20509:
URL: https://github.com/apache/incubator-mxnet/pull/20509


   


-- 
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: commits-unsubscribe@mxnet.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org