Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

fix crash when profiler not enabled #10306

Merged
merged 8 commits into from Mar 31, 2018
Merged

Conversation

cjolivier01
Copy link
Member

Description

(Brief description on what this PR is about)

Checklist

Essentials

Please feel free to remove inapplicable items for your PR.

  • The PR title starts with [MXNET-$JIRA_ID], where $JIRA_ID refers to the relevant JIRA issue created (except PRs with tiny changes)
  • Changes are complete (i.e. I finished coding on this PR)
  • All changes have test coverage:
  • Unit tests are added for small changes to verify correctness (e.g. adding a new operator)
  • Nightly tests are added for complicated/long-running ones (e.g. changing distributed kvstore)
  • Build tests will be added for build configuration changes (e.g. adding a new build option with NCCL)
  • Code is well-documented:
  • For user-facing API changes, API doc string has been updated.
  • For new C++ functions in header files, their functionalities and arguments are documented.
  • For new examples, README.md is added to explain the what the example does, the source of the dataset, expected performance on test set and reference to the original paper if applicable
  • Check the API doc at http://mxnet-ci-doc.s3-accelerate.dualstack.amazonaws.com/PR-$PR_ID/$BUILD_ID/index.html
  • To the my best knowledge, examples are either not affected by this change, or have been fixed to be compatible with this change

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

@@ -398,7 +398,8 @@ class ThreadedEngine : public Engine {
}

int bulk_size() const override {
return profiler::Profiler::Get()->AggregateRunning() ? 0 : BulkStatusStore::Get()->bulk_size;
const profiler::Profiler *prof = profiler::Profiler::Get();
Copy link
Contributor

Choose a reason for hiding this comment

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

why would profiler::get return nullptr when it's not enabled?

Copy link
Member Author

Choose a reason for hiding this comment

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

I didn't think it did either. When profiler isn't enabled in the build at all.
The ability to turn profiler off in the build will be removed soon

@piiswrong
Copy link
Contributor

@marcoabreu any idea why CI wasn't able to catch this?

@szha
Copy link
Member

szha commented Mar 28, 2018

Is there a build that doesn't turn on profiler?

@cjolivier01
Copy link
Member Author

I think I'll just remove the ability to turn off profiler at build time tomorrow

@cjolivier01
Copy link
Member Author

cjolivier01 commented Mar 28, 2018

Here is removing profiler option: #10308
With that change, this PR isn't needed

@cjolivier01
Copy link
Member Author

everyone ok for this to merge when it completes?

@sxjscience
Copy link
Member

I'm ok for merging.

@marcoabreu
Copy link
Contributor

@piiswrong I think all builds in CI are turning on profiler by default

@cjolivier01
Copy link
Member Author

attempt number 6 to build with CI...

@@ -1784,3 +1784,4 @@ def test_kernel_error_checking():
if __name__ == '__main__':
import nose
nose.runmodule()
mx.base._notify_shutdown()
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't this call problems if another test is run afterwards?

@marcoabreu
Copy link
Contributor

I know the notify_shutdown() is only an attempt to fix the hanging gpu test, but could you make sure to remove it before you merge this PR?

@cjolivier01
Copy link
Member Author

cjolivier01 commented Mar 29, 2018 via email

@cjolivier01 cjolivier01 merged commit 4ad0bba into apache:master Mar 31, 2018
lanking520 pushed a commit to lanking520/incubator-mxnet that referenced this pull request Apr 2, 2018
* fix crash when profiler not enabled

* fix

* Update graph_executor.cc

* Update graph_executor.cc

* use nosetests to try and prevent thehang

* shutdown after GPU pass

* remove temp

* remove temp
haojin2 pushed a commit to haojin2/incubator-mxnet that referenced this pull request Apr 2, 2018
* fix crash when profiler not enabled

* fix

* Update graph_executor.cc

* Update graph_executor.cc

* use nosetests to try and prevent thehang

* shutdown after GPU pass

* remove temp

* remove temp
rahul003 pushed a commit to rahul003/mxnet that referenced this pull request Jun 4, 2018
* fix crash when profiler not enabled

* fix

* Update graph_executor.cc

* Update graph_executor.cc

* use nosetests to try and prevent thehang

* shutdown after GPU pass

* remove temp

* remove temp
zheng-da pushed a commit to zheng-da/incubator-mxnet that referenced this pull request Jun 28, 2018
* fix crash when profiler not enabled

* fix

* Update graph_executor.cc

* Update graph_executor.cc

* use nosetests to try and prevent thehang

* shutdown after GPU pass

* remove temp

* remove temp
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants