Skip to content

Commit 222ce6f

Browse files
zhyncsBBuf
andauthored
add tensorrt_llm common and cutlass_extensions as 3rdparty (sgl-project#3216)
Co-authored-by: BBuf <[email protected]>
1 parent 468d23c commit 222ce6f

File tree

86 files changed

+23201
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

86 files changed

+23201
-0
lines changed

.clang-format-ignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
sgl-kernel/3rdparty/tensorrt_llm/*
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
#
2+
# SPDX-FileCopyrightText: Copyright (c) 1993-2022 NVIDIA CORPORATION &
3+
# AFFILIATES. All rights reserved. SPDX-License-Identifier: Apache-2.0
4+
#
5+
# Licensed under the Apache License, Version 2.0 (the "License"); you may not
6+
# use this file except in compliance with the License. You may obtain a copy of
7+
# the License at
8+
#
9+
# http://www.apache.org/licenses/LICENSE-2.0
10+
#
11+
# Unless required by applicable law or agreed to in writing, software
12+
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13+
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14+
# License for the specific language governing permissions and limitations under
15+
# the License.
16+
#
17+
file(GLOB SRCS *.cpp)
18+
file(GLOB CU_SRCS *.cu)
19+
20+
add_library(common_src OBJECT ${SRCS} ${CU_SRCS})
21+
set_property(TARGET common_src PROPERTY POSITION_INDEPENDENT_CODE ON)
22+
set_property(TARGET common_src PROPERTY CUDA_RESOLVE_DEVICE_SYMBOLS ON)
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
/*
2+
* Copyright (c) 2022-2024, NVIDIA CORPORATION. All rights reserved.
3+
*
4+
* Licensed under the Apache License, Version 2.0 (the "License");
5+
* you may not use this file except in compliance with the License.
6+
* You may obtain a copy of the License at
7+
*
8+
* http://www.apache.org/licenses/LICENSE-2.0
9+
*
10+
* Unless required by applicable law or agreed to in writing, software
11+
* distributed under the License is distributed on an "AS IS" BASIS,
12+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
* See the License for the specific language governing permissions and
14+
* limitations under the License.
15+
*/
16+
17+
#include "tensorrt_llm/common/assert.h"
18+
19+
namespace
20+
{
21+
22+
bool initCheckDebug()
23+
{
24+
auto constexpr kDebugEnabled = "TLLM_DEBUG_MODE";
25+
auto const debugEnabled = std::getenv(kDebugEnabled);
26+
return debugEnabled && debugEnabled[0] == '1';
27+
}
28+
} // namespace
29+
30+
bool DebugConfig::isCheckDebugEnabled()
31+
{
32+
static bool const debugEnabled = initCheckDebug();
33+
return debugEnabled;
34+
}

0 commit comments

Comments
 (0)