Skip to content

Commit

Permalink
Merge branch 'master' into support_input_check
Browse files Browse the repository at this point in the history
  • Loading branch information
Dmovic authored Jul 9, 2024
2 parents f0e5e24 + 850b4ad commit 0d56eba
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 4 deletions.
3 changes: 2 additions & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
black==19.10b0; python_version >= "3.6"
click==8.0.0; python_version >= "3.6" # https://github.com/psf/black/issues/2964
numpy>=1.21.6
numpy>=1.21.6, <2.0
protobuf>=3.9.2, <4.0
wheel
tqdm
Expand All @@ -16,3 +16,4 @@ pytest-xdist
pytest-repeat
rich
portalocker
typing-extensions>=4.0.0, <5.0
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,11 @@ Maybe<void> CudnnFusedNormalizationAddReluPass::Apply(Job* job, JobPassCtx* ctx)
OperatorConf new_op_conf = op_conf;
auto mute_attrs = new_op_conf.mutable_user_conf()->mutable_attr();
auto training_it = mute_attrs->find("training");
if (training_it != mute_attrs->end()) { mute_attrs->erase(training_it); }
if (training_it != mute_attrs->end()) {
const bool training = user_op_conf.attr<bool>("training");
if (!training) { return; }
mute_attrs->erase(training_it);
}
new_op_conf.mutable_user_conf()->set_op_type_name("cudnn_fused_" + op_type_name);
job_builder.MutOpsOnlyOnce({new_op_conf});
});
Expand Down
2 changes: 1 addition & 1 deletion python/oneflow/mock_torch/mock_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from collections import deque
from importlib import import_module

if sys.version_info < (3, 8):
if sys.version_info <= (3, 8):
try:
from importlib_metadata import requires
except ImportError:
Expand Down
3 changes: 2 additions & 1 deletion python/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,9 @@ def get_version():


REQUIRED_PACKAGES = [
f"numpy>={np.__version__}",
f"numpy>={np.__version__}, <2.0",
"protobuf>=3.9.2, <4.0",
"typing-extensions>=4.0.0, <5.0",
"tqdm",
"requests",
"pillow",
Expand Down

0 comments on commit 0d56eba

Please sign in to comment.