Skip to content

Fix bug of empty input in gelu.cu #800

Merged
amcadmus merged 6 commits into
deepmodeling:develfrom
iProzd:devel
Jun 27, 2021
Merged

Fix bug of empty input in gelu.cu #800
amcadmus merged 6 commits into
deepmodeling:develfrom
iProzd:devel

Conversation

@iProzd

@iProzd iProzd commented Jun 26, 2021

Copy link
Copy Markdown
Member

#675 and #742 maybe the same bugs when:

  1. using gelu as activation function (GPU environment);
  2. there's one type (or types) of atom not showing in the system but in the type_map;
    this causes the empty input in gelu.cu and thus breaks.

@codecov-commenter

codecov-commenter commented Jun 26, 2021

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 73.96%. Comparing base (b145ca3) to head (a958bcb).

Additional details and impacted files
@@           Coverage Diff           @@
##            devel     #800   +/-   ##
=======================================
  Coverage   73.96%   73.96%           
=======================================
  Files          84       84           
  Lines        6588     6588           
=======================================
  Hits         4873     4873           
  Misses       1715     1715           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@iProzd iProzd closed this Jun 26, 2021
@iProzd iProzd reopened this Jun 26, 2021
@njzjz

njzjz commented Jun 26, 2021

Copy link
Copy Markdown
Member

Is our gelu much faster than TensorFlow's (tensorflow/tensorflow#41178)? It seems that they implement gelu only using some python codes. See https://github.com/tensorflow/tensorflow/blob/v2.5.0/tensorflow/python/ops/nn_ops.py#L3505-L3548

@amcadmus

Copy link
Copy Markdown
Member

Is our gelu much faster than TensorFlow's (tensorflow/tensorflow#41178)? It seems that they implement gelu only using some python codes. See https://github.com/tensorflow/tensorflow/blob/v2.5.0/tensorflow/python/ops/nn_ops.py#L3505-L3548

Yes, that's why we implement gelu by ourselves

@amcadmus amcadmus merged commit 4db15c8 into deepmodeling:devel Jun 27, 2021
gzq942560379 pushed a commit to HPC-AI-Team/deepmd-kit that referenced this pull request Sep 2, 2021
* add gpu op unittest in source/tests

* fix bug in deepmodeling#713

* Fix bug of empty input in gelu.cu
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants