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

Enable triton-client python interface #8943

Merged
merged 1 commit into from
Jan 16, 2024

Conversation

smuzaffar
Copy link
Contributor

@smuzaffar smuzaffar commented Jan 16, 2024

This enables the triton client python interface. Code like [a] runs in cmssw env with this change.

[a]

bash-4.4$ python3
Python 3.9.14 (main, Jun 21 2023, 12:13:52) 
[GCC 12.3.1 20230527] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from tritonclient import grpc
>>> from google.protobuf import text_format, message, descriptor
>>> model = grpc.model_config_pb2.ModelConfig()
>>> config='/cvmfs/cms.cern.ch/share/cms/data-HeterogeneousCore-SonicTriton/V00-02-00/HeterogeneousCore/SonicTriton/data/models/gat_test/config.pbtxt'
>>> with open(config,'r') as infile:
...   text_format.Parse(infile.read(), model)
... 
name: "gat_test"
platform: "pytorch_libtorch"
input {
  name: "x__0"
  data_type: TYPE_FP32
  dims: -1
  dims: 1433
}
input {
  name: "edgeindex__1"
  data_type: TYPE_INT64
  dims: 2
  dims: -1
}
output {
  name: "logits__0"
  data_type: TYPE_FP32
  dims: -1
  dims: 7
}

>>> 

@cmsbuild
Copy link
Contributor

A new Pull Request was created by @smuzaffar (Malik Shahzad Muzaffar) for branch IB/CMSSW_14_0_X/master.

@smuzaffar, @iarspider, @aandvalenzuela, @cmsbuild can you please review it and eventually sign? Thanks.
@antoniovilela, @sextonkennedy, @rappoccio you are the release manager for this.
cms-bot commands are listed here

@cmsbuild
Copy link
Contributor

cmsbuild commented Jan 16, 2024

cms-bot internal usage

@smuzaffar
Copy link
Contributor Author

please test

@smuzaffar
Copy link
Contributor Author

please test for el8_aarch64_gcc12

@smuzaffar
Copy link
Contributor Author

please test for el8_ppc64le_gcc12

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-edb4ab/36845/summary.html
COMMIT: ea84576
CMSSW: CMSSW_14_0_X_2024-01-15-2300/el8_amd64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmsdist/8943/36845/install.sh to create a dev area with all the needed externals and cmssw changes.

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:

You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-edb4ab/36845/git-recent-commits.json
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-edb4ab/36845/git-merge-result

Comparison Summary

Summary:

@@ -44,25 +47,46 @@ cmake ${PROJ_DIR} \
-DCMAKE_CXX_STANDARD=%{cms_cxx_standard} \
-DTRITON_ENABLE_CC_HTTP=OFF \
-DTRITON_ENABLE_CC_GRPC=ON \
-DTRITON_ENABLE_PYTHON_HTTP=OFF \
Copy link
Contributor

Choose a reason for hiding this comment

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

If this part is only for building the C++ client (since there's a separate buildpy below), shouldn't these lines be kept here? (the defaults for all of these are OFF, right now, but I think it's better to be explicit, in case the default changes...)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

These TRITON_ENABLE_PYTHON_* flags are not available for triton/src/c++/CMakeLists.txt ( which we use to build the c++ interface) and cmake generate warning message that these are unused flags.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, that is because they are in the top-level CMakeLists.txt, but we're using the project-specific ones for more control. Okay, never mind then.

-DCMAKE_INSTALL_LIBDIR=lib \
-DCMAKE_BUILD_TYPE=Release \
-DCMAKE_CXX_STANDARD=%{cms_cxx_standard} \
-DTRITON_ENABLE_PYTHON_HTTP=OFF \
Copy link
Contributor

Choose a reason for hiding this comment

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

Following the above comment, I would include the corresponding lines here:

    -DTRITON_ENABLE_CC_HTTP=OFF \
    -DTRITON_ENABLE_CC_GRPC=OFF \

Copy link
Contributor Author

Choose a reason for hiding this comment

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

these flags are not available for triton/src/python/CMakeLists.txt which we use to build the python interface

@kpedro88
Copy link
Contributor

thanks @smuzaffar ! Indeed, I think it was the lack of a rapidJSON external that had kept me from enabling the python client.

@cmsbuild
Copy link
Contributor

+1

Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-edb4ab/36849/summary.html
COMMIT: ea84576
CMSSW: CMSSW_14_0_X_2024-01-15-2300/el8_ppc64le_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmsdist/8943/36849/install.sh to create a dev area with all the needed externals and cmssw changes.

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:

You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-edb4ab/36849/git-recent-commits.json
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-edb4ab/36849/git-merge-result

@cmsbuild
Copy link
Contributor

-1

Failed Tests: RelVals
Summary: https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-edb4ab/36850/summary.html
COMMIT: ea84576
CMSSW: CMSSW_14_0_X_2024-01-15-2300/el8_aarch64_gcc12
User test area: For local testing, you can use /cvmfs/cms-ci.cern.ch/week0/cms-sw/cmsdist/8943/36850/install.sh to create a dev area with all the needed externals and cmssw changes.

The following merge commits were also included on top of IB + this PR after doing git cms-merge-topic:

You can see more details here:
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-edb4ab/36850/git-recent-commits.json
https://cmssdt.cern.ch/SDT/jenkins-artifacts/pull-request-integration/PR-edb4ab/36850/git-merge-result

RelVals

----- Begin Fatal Exception 16-Jan-2024 16:47:42 CET-----------------------
An exception of category 'FatalRootError' occurred while
   [0] Processing global end Run run: 1
   [1] Calling method for module DQMGenericClient/'postProcessorTrack'
   Additional Info:
      [a] Fatal Root Error: @SUB=Minuit2
VariableMetricBuilder Initial matrix not pos.def.

----- End Fatal Exception -------------------------------------------------

@smuzaffar
Copy link
Contributor Author

@kpedro88 , should we try to update triton client ?

@kpedro88
Copy link
Contributor

@smuzaffar we do not have any urgent need to update the triton client at the moment, so let's not complicate this PR.

@smuzaffar
Copy link
Contributor Author

+externals

@smuzaffar smuzaffar merged commit fc0567d into IB/CMSSW_14_0_X/master Jan 16, 2024
20 of 21 checks passed
@cmsbuild
Copy link
Contributor

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

@kpedro88 kpedro88 mentioned this pull request Jan 16, 2024
17 tasks
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.

3 participants