Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mxnet python bindings #5667

Merged
merged 4 commits into from Mar 20, 2020
Merged

Conversation

mrodozov
Copy link
Contributor

please test
both python 2 and 3

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 18, 2020

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/5264/console Started: 2020/03/18 23:36

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @mrodozov (Mircho Rodozov) for branch IB/CMSSW_11_1_X/master.

@cmsbuild, @smuzaffar, @mrodozov, @tulamor can you please review it and eventually sign? Thanks.
cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

+1
Tested at: a6732ef
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-952791/5264/summary.html
CMSSW: CMSSW_11_1_X_2020-03-18-1100
SCRAM_ARCH: slc7_amd64_gcc820

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-952791/5264/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 34
  • DQMHistoTests: Total histograms compared: 2692437
  • DQMHistoTests: Total failures: 35
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2692083
  • DQMHistoTests: Total skipped: 319
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 33 files compared)
  • Checked 147 log files, 16 edm output root files, 34 DQM output files

## INITENV +PATH PYTHON27PATH %{i}/lib64/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages
## INITENV +PATH PYTHON3PATH %{i}/lib64/python`echo $PYTHON3_VERSION | cut -d. -f 1,2`/site-packages
## INITENV +PATH LD_LIBRARY_PATH %{i}/lib64

%define tag 337cf1b54cc02bde94f459c89863a18187b0aada
%define branch 1.5.0-cms-mod
%define github_user cms-externals
Source: git+https://github.com/%{github_user}/incubator-mxnet.git?obj=%{branch}/%{tag}&export=%{n}-%{realversion}&submodules=1&output=/%{n}-%{realversion}-%{tag}.tgz

BuildRequires: cmake ninja ccache
Copy link
Contributor

Choose a reason for hiding this comment

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

@mrodozov , please drop this dependency and use our gcc compiler

@@ -17,6 +21,8 @@ rm -rf ../build; mkdir ../build; cd ../build
# use LAPACK functions in OpenBLAS:
# manually set MXNET_USE_LAPACK=1 and turn off USE_LAPACK in cmake
export CFLAGS="-DMXNET_USE_LAPACK=1 -DMXNET_THREAD_LOCAL_ENGINE=1"
export PYTHONV=$(echo $PYTHON_VERSION | cut -f1,2 -d.)
export PYTHON3V=$(echo $PYTHON3_VERSION | cut -f1,2 -d.)

cmake ../%{n}-%{realversion} -GNinja \
-DCMAKE_CUDA_COMPILER_LAUNCHER=ccache \
Copy link
Contributor

Choose a reason for hiding this comment

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

@mrodozov , we also need to clean this up, we should use our compiler

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ok let me see about that

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I'm trying to understand what is ccache doing as a "compiler launcher". we don't use cuda with mxnet so I'll guess I have to change it to gcc (I did it and it's building), but also because we don't use cuda do we need this flag ?

Copy link
Contributor

Choose a reason for hiding this comment

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

just drop ccache dependency and remove the 3 LAUNCHER lines from cmake command and you should be fine.

@smuzaffar
Copy link
Contributor

@mrodozov , can you please also add a unit test in cmssw to text mxnet ( https://mxnet.apache.org/get_started/validate_mxnet#python ) ?

@mrodozov
Copy link
Contributor Author

sure. I'll get the test as it is

@cmsbuild
Copy link
Contributor

Pull request #5667 was updated.

@smuzaffar
Copy link
Contributor

@mrodozov , please add mxnet-predict in to python_tools.spec otherwise PYTHON*PATH will not be properly set in cmssw env.

@mrodozov
Copy link
Contributor Author

please test

@@ -1,12 +1,16 @@
### RPM external mxnet-predict 1.5.0
## INITENV +PATH PYTHON27PATH %{i}/lib64/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages
## INITENV +PATH PYTHON3PATH %{i}/lib64/python`echo $PYTHON3_VERSION | cut -d. -f 1,2`/site-packages
Copy link
Contributor

Choose a reason for hiding this comment

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

@mrodozov , please use PYTHON3_LIB_SITE_PACKAGES here

@@ -1,12 +1,16 @@
### RPM external mxnet-predict 1.5.0
## INITENV +PATH PYTHON27PATH %{i}/lib64/python`echo $PYTHON_VERSION | cut -d. -f 1,2`/site-packages
Copy link
Contributor

Choose a reason for hiding this comment

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

use PYTHON_LIB_SITE_PACKAGES


cmake ../%{n}-%{realversion} -GNinja \
-DCMAKE_CUDA_COMPILER_LAUNCHER=ccache \
-DCMAKE_C_COMPILER_LAUNCHER=ccache \
-DCMAKE_CXX_COMPILER_LAUNCHER=ccache \
Copy link
Contributor

Choose a reason for hiding this comment

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

pass -DCMAKE_INSTALL_LIBDIR=lib to get lib instead of lib64. fix -toolfile to pointto lib

rm %{i}/lib64/*.a

rm %{i}/lib64/*.a %{i}/*.so
mv %{i}/python* %{i}/lib64
Copy link
Contributor

Choose a reason for hiding this comment

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

once cmake is updated to use lib, then fix this one too

@cmsbuild
Copy link
Contributor

Pull request #5667 was updated.

@mrodozov
Copy link
Contributor Author

please test

@cmsbuild
Copy link
Contributor

cmsbuild commented Mar 20, 2020

The tests are being triggered in jenkins.
https://cmssdt.cern.ch/jenkins/job/ib-run-pr-tests/5290/console Started: 2020/03/20 14:26

@cmsbuild
Copy link
Contributor

+1
Tested at: 23f7bde
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-952791/5290/summary.html
CMSSW: CMSSW_11_1_X_2020-03-19-2300
SCRAM_ARCH: slc7_amd64_gcc820

@cmsbuild
Copy link
Contributor

Comparison job queued.

@cmsbuild
Copy link
Contributor

Comparison is ready
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-952791/5290/summary.html

Comparison Summary:

  • No significant changes to the logs found
  • Reco comparison results: 0 differences found in the comparisons
  • DQMHistoTests: Total files compared: 34
  • DQMHistoTests: Total histograms compared: 2692493
  • DQMHistoTests: Total failures: 60
  • DQMHistoTests: Total nulls: 0
  • DQMHistoTests: Total successes: 2692114
  • DQMHistoTests: Total skipped: 319
  • DQMHistoTests: Total Missing objects: 0
  • DQMHistoSizes: Histogram memory added: 0.0 KiB( 33 files compared)
  • Checked 147 log files, 16 edm output root files, 34 DQM output files

@smuzaffar
Copy link
Contributor

+externals

@cmsbuild
Copy link
Contributor

This pull request is fully signed and it will be integrated in one of the next IB/CMSSW_11_1_X/master IBs (tests are also fine). This pull request will now be reviewed by the release team before it's merged. @davidlange6, @silviodonato, @fabiocos (and backports should be raised in the release meeting by the corresponding L2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants