Skip to content

Commit 15bfe45

Browse files
committed
(//ci): Added workflow file
Signed-off-by: Anurag Dixit <[email protected]>
1 parent 5e5632b commit 15bfe45

File tree

3 files changed

+92
-9
lines changed

3 files changed

+92
-9
lines changed

.github/workflows/blossom-ci.yml

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
# Copyright (c) 2022, NVIDIA CORPORATION.
2+
#
3+
# Licensed under the Apache License, Version 2.0 (the "License");
4+
# you may not use this file except in compliance with the License.
5+
# You may obtain a copy of the License at
6+
#
7+
# http://www.apache.org/licenses/LICENSE-2.0
8+
#
9+
# Unless required by applicable law or agreed to in writing, software
10+
# distributed under the License is distributed on an "AS IS" BASIS,
11+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12+
# See the License for the specific language governing permissions and
13+
# limitations under the License.
14+
15+
# A workflow to trigger ci on hybrid infra (github + self hosted runner)
16+
name: Blossom-CI
17+
on:
18+
issue_comment:
19+
types: [created]
20+
workflow_dispatch:
21+
inputs:
22+
platform:
23+
description: 'runs-on argument'
24+
required: false
25+
args:
26+
description: 'argument'
27+
required: false
28+
jobs:
29+
Authorization:
30+
name: Authorization
31+
runs-on: blossom
32+
outputs:
33+
args: ${{ env.args }}
34+
35+
# This job only runs for pull request comments
36+
if: |
37+
contains( ${{ secrets.AUTHORIZED_USERS }}, format('{0},', github.actor)) &&
38+
github.event.comment.body == '/nvidia-ci'
39+
steps:
40+
- name: Check if comment is issued by authorized person
41+
run: blossom-ci
42+
env:
43+
OPERATION: 'AUTH'
44+
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45+
REPO_KEY_DATA: ${{ secrets.BLOSSOM_KEY }}
46+
47+
Vulnerability-scan:
48+
name: Vulnerability scan
49+
needs: [Authorization]
50+
runs-on: ubuntu-latest
51+
steps:
52+
- name: Checkout code
53+
uses: actions/checkout@v2
54+
with:
55+
repository: ${{ fromJson(needs.Authorization.outputs.args).repo }}
56+
ref: ${{ fromJson(needs.Authorization.outputs.args).ref }}
57+
lfs: 'true'
58+
59+
- name: Run blossom action
60+
uses: NVIDIA/blossom-action@main
61+
env:
62+
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
63+
REPO_KEY_DATA: ${{ secrets.BLOSSOM_KEY }}
64+
with:
65+
args1: ${{ fromJson(needs.Authorization.outputs.args).args1 }}
66+
args2: ${{ fromJson(needs.Authorization.outputs.args).args2 }}
67+
args3: ${{ fromJson(needs.Authorization.outputs.args).args3 }}
68+
69+
Job-trigger:
70+
name: Start ci job
71+
needs: [Vulnerability-scan]
72+
runs-on: blossom
73+
steps:
74+
- name: Start ci job
75+
run: blossom-ci
76+
env:
77+
OPERATION: 'START-CI-JOB'
78+
CI_SERVER: ${{ secrets.CI_SERVER }}
79+
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
80+
81+
Upload-Log:
82+
name: Upload log
83+
runs-on: blossom
84+
if : github.event_name == 'workflow_dispatch'
85+
steps:
86+
- name: Jenkins log for pull request ${{ fromJson(github.event.inputs.args).pr }} (click here)
87+
run: blossom-ci
88+
env:
89+
OPERATION: 'POST-PROCESSING'
90+
CI_SERVER: ${{ secrets.CI_SERVER }}
91+
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}

core/lowering/register_trt_placeholder_ops.cpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@ c10::AliasAnalysisKind aliasAnalysisFromSchema() {
1010
RegisterOperators trt_placeholder_ops_reg({
1111
/// Op marks a Tensor to be conveted from an Torch Tensor
1212
/// to a TRT constant Tensor
13-
Operator(
14-
"trt::const(Tensor val) -> Tensor",
15-
[](Stack& stack) { /*noop*/ },
16-
aliasAnalysisFromSchema()),
13+
Operator("trt::const(Tensor val) -> Tensor", [](Stack& stack) { /*noop*/ }, aliasAnalysisFromSchema()),
1714
});
1815

1916
} // namespace jit

docker/WORKSPACE.docs

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@ new_local_repository(
4444
build_file = "@//third_party/cublas:BUILD",
4545
)
4646

47-
local_repository(
48-
name = "torch_tensorrt",
49-
path = "/usr/local/lib/python3.8/dist-packages/torch_tensorrt"
50-
)
51-
5247
#############################################################################################################
5348
# Tarballs and fetched dependencies (default - use in cases when building from precompiled bin and tarballs)
5449
#############################################################################################################

0 commit comments

Comments
 (0)