Skip to content

Commit 3f0aa69

Browse files
authored
merge main into amd-staging (#612)
2 parents d6c2e8c + ecb66f0 commit 3f0aa69

File tree

82 files changed

+1208
-612
lines changed

Some content is hidden

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

82 files changed

+1208
-612
lines changed

.ci/metrics/metrics.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,13 @@ def github_get_metrics(
370370
started_at = job.started_at
371371
completed_at = job.completed_at
372372

373+
if completed_at is None:
374+
logging.info(
375+
f"Workflow {task.id} is marked completed but has a job without a "
376+
"completion timestamp."
377+
)
378+
continue
379+
373380
# GitHub API can return results where the started_at is slightly
374381
# later then the created_at (or completed earlier than started).
375382
# This would cause a -23h59mn delta, which will show up as +24h

clang/include/clang/Basic/BuiltinsNVPTX.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -615,7 +615,7 @@ def __nvvm_f2bf16_rz : NVPTXBuiltinSMAndPTX<"__bf16(float)", SM_80, PTX70>;
615615
def __nvvm_f2bf16_rz_relu : NVPTXBuiltinSMAndPTX<"__bf16(float)", SM_80, PTX70>;
616616

617617
def __nvvm_f2tf32_rna : NVPTXBuiltinSMAndPTX<"int32_t(float)", SM_80, PTX70>;
618-
def __nvvm_f2tf32_rna_satfinite : NVPTXBuiltinSMAndPTX<"int32_t(float)", SM_89, PTX81>;
618+
def __nvvm_f2tf32_rna_satfinite : NVPTXBuiltinSMAndPTX<"int32_t(float)", SM_80, PTX81>;
619619
def __nvvm_f2tf32_rn : NVPTXBuiltinSMAndPTX<"int32_t(float)", SM_90, PTX78>;
620620
def __nvvm_f2tf32_rn_relu : NVPTXBuiltinSMAndPTX<"int32_t(float)", SM_90, PTX78>;
621621
def __nvvm_f2tf32_rn_satfinite : NVPTXBuiltinSMAndPTX<"int32_t(float)", SM_100, PTX86>;

clang/test/CodeGen/builtins-nvptx.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@
2828
// RUN: %clang_cc1 -ffp-contract=off -triple nvptx64-unknown-unknown -target-cpu sm_89 -target-feature +ptx81 -DPTX=81\
2929
// RUN: -disable-llvm-optzns -fcuda-is-device -emit-llvm -o - -x cuda %s \
3030
// RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK_PTX81_SM89 %s
31+
// RUN: %clang_cc1 -ffp-contract=off -triple nvptx64-unknown-unknown -target-cpu sm_80 -target-feature +ptx81 -DPTX=81 \
32+
// RUN: -disable-llvm-optzns -fcuda-is-device -emit-llvm -o - -x cuda %s \
33+
// RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK_PTX81_SM80 %s
3134
// RUN: %clang_cc1 -ffp-contract=off -triple nvptx64-unknown-unknown -target-cpu sm_90 -target-feature +ptx78 -DPTX=78 \
3235
// RUN: -disable-llvm-optzns -fcuda-is-device -emit-llvm -o - -x cuda %s \
3336
// RUN: | FileCheck -check-prefix=CHECK -check-prefix=CHECK_PTX78_SM90 %s
@@ -1025,6 +1028,10 @@ __device__ void nvvm_cvt_sm80() {
10251028

10261029
// CHECK_PTX70_SM80: call i32 @llvm.nvvm.f2tf32.rna(float 1.000000e+00)
10271030
__nvvm_f2tf32_rna(1);
1031+
#if PTX >= 81
1032+
// CHECK_PTX81_SM80: call i32 @llvm.nvvm.f2tf32.rna.satfinite(float 1.000000e+00)
1033+
__nvvm_f2tf32_rna_satfinite(1.0f);
1034+
#endif
10281035
#endif
10291036
// CHECK: ret void
10301037
}
@@ -1058,9 +1065,6 @@ __device__ void nvvm_cvt_sm89() {
10581065
__nvvm_e5m2x2_to_f16x2_rn(0x4c4c);
10591066
// CHECK_PTX81_SM89: call <2 x half> @llvm.nvvm.e5m2x2.to.f16x2.rn.relu(i16 19532)
10601067
__nvvm_e5m2x2_to_f16x2_rn_relu(0x4c4c);
1061-
1062-
// CHECK_PTX81_SM89: call i32 @llvm.nvvm.f2tf32.rna.satfinite(float 1.000000e+00)
1063-
__nvvm_f2tf32_rna_satfinite(1.0f);
10641068
#endif
10651069
// CHECK: ret void
10661070
}

compiler-rt/lib/scudo/standalone/tests/map_test.cpp

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -120,17 +120,17 @@ TEST(ScudoMapTest, Zeroing) {
120120
#if SCUDO_LINUX
121121
// Now verify that if madvise fails, the data is still zeroed.
122122
memset(Data, 1U, MemMap.getCapacity());
123-
EXPECT_NE(-1, mlock(Data, MemMap.getCapacity()));
124-
125-
EXPECT_EQ(1U, Data[0]);
126-
EXPECT_EQ(1U, Data[PageSize]);
127-
EXPECT_EQ(1U, Data[PageSize * 2]);
128-
MemMap.releaseAndZeroPagesToOS(MemMap.getBase(), MemMap.getCapacity());
129-
EXPECT_EQ(0U, Data[0]);
130-
EXPECT_EQ(0U, Data[PageSize]);
131-
EXPECT_EQ(0U, Data[PageSize * 2]);
132-
133-
EXPECT_NE(-1, munlock(Data, MemMap.getCapacity()));
123+
if (mlock(Data, MemMap.getCapacity()) != -1) {
124+
EXPECT_EQ(1U, Data[0]);
125+
EXPECT_EQ(1U, Data[PageSize]);
126+
EXPECT_EQ(1U, Data[PageSize * 2]);
127+
MemMap.releaseAndZeroPagesToOS(MemMap.getBase(), MemMap.getCapacity());
128+
EXPECT_EQ(0U, Data[0]);
129+
EXPECT_EQ(0U, Data[PageSize]);
130+
EXPECT_EQ(0U, Data[PageSize * 2]);
131+
132+
EXPECT_NE(-1, munlock(Data, MemMap.getCapacity()));
133+
}
134134
#endif
135135

136136
MemMap.unmap();

compiler-rt/test/lit.common.cfg.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -113,18 +113,16 @@ def push_dynamic_library_lookup_path(config, new_path):
113113
config.environment[dynamic_library_lookup_var] = new_ld_library_path_64
114114

115115

116-
# TODO: Consolidate the logic for turning on the internal shell by default for all LLVM test suites.
117-
# See https://github.com/llvm/llvm-project/issues/106636 for more details.
118-
#
119116
# Choose between lit's internal shell pipeline runner and a real shell. If
120117
# LIT_USE_INTERNAL_SHELL is in the environment, we use that as an override.
121118
use_lit_shell = os.environ.get("LIT_USE_INTERNAL_SHELL")
122119
if use_lit_shell:
123120
# 0 is external, "" is default, and everything else is internal.
124121
execute_external = use_lit_shell == "0"
125122
else:
126-
# Otherwise we default to internal everywhere.
127-
execute_external = False
123+
# Otherwise we default to internal on Windows and external elsewhere, as
124+
# bash on Windows is usually very slow.
125+
execute_external = not sys.platform in ["win32"]
128126

129127
# Allow expanding substitutions that are based on other substitutions
130128
config.recursiveExpansionLimit = 10

compiler-rt/test/orc/TestCases/Darwin/arm64/objc-imageinfo.S

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,9 @@
55

66
// RUN: rm -rf %t
77
// RUN: split-file %s %t
8-
// RUN: (cd %t; %clang -c *.S)
8+
// RUN: pushd %t
9+
// RUN: %clang -c *.S
10+
// RUN: popd
911

1012
// Check individual versions are loadable.
1113

libc/config/linux/aarch64/entrypoints.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -945,6 +945,7 @@ if(LLVM_LIBC_FULL_BUILD)
945945
# arpa/inet.h entrypoints
946946
libc.src.arpa.inet.htonl
947947
libc.src.arpa.inet.htons
948+
libc.src.arpa.inet.inet_addr
948949
libc.src.arpa.inet.inet_aton
949950
libc.src.arpa.inet.ntohl
950951
libc.src.arpa.inet.ntohs

libc/config/linux/riscv/entrypoints.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1078,6 +1078,7 @@ if(LLVM_LIBC_FULL_BUILD)
10781078
# arpa/inet.h entrypoints
10791079
libc.src.arpa.inet.htonl
10801080
libc.src.arpa.inet.htons
1081+
libc.src.arpa.inet.inet_addr
10811082
libc.src.arpa.inet.inet_aton
10821083
libc.src.arpa.inet.ntohl
10831084
libc.src.arpa.inet.ntohs

libc/config/linux/x86_64/entrypoints.txt

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1119,6 +1119,7 @@ if(LLVM_LIBC_FULL_BUILD)
11191119
# arpa/inet.h entrypoints
11201120
libc.src.arpa.inet.htonl
11211121
libc.src.arpa.inet.htons
1122+
libc.src.arpa.inet.inet_addr
11221123
libc.src.arpa.inet.inet_aton
11231124
libc.src.arpa.inet.ntohl
11241125
libc.src.arpa.inet.ntohs
@@ -1254,7 +1255,11 @@ if(LLVM_LIBC_FULL_BUILD)
12541255
libc.src.stdlib.atexit
12551256
libc.src.stdlib.exit
12561257
libc.src.stdlib.getenv
1258+
libc.src.stdlib.mbstowcs
1259+
libc.src.stdlib.mbtowc
12571260
libc.src.stdlib.quick_exit
1261+
libc.src.stdlib.wcstombs
1262+
libc.src.stdlib.wctomb
12581263

12591264
# signal.h entrypoints
12601265
libc.src.signal.kill
@@ -1372,13 +1377,9 @@ if(LLVM_LIBC_FULL_BUILD)
13721377
libc.src.wchar.mbrlen
13731378
libc.src.wchar.mbsinit
13741379
libc.src.wchar.mbrtowc
1375-
libc.src.wchar.mbtowc
1376-
libc.src.wchar.mbstowcs
13771380
libc.src.wchar.mbsrtowcs
13781381
libc.src.wchar.mbsnrtowcs
13791382
libc.src.wchar.wcrtomb
1380-
libc.src.wchar.wctomb
1381-
libc.src.wchar.wcstombs
13821383
libc.src.wchar.wcsrtombs
13831384
libc.src.wchar.wcsnrtombs
13841385

libc/include/arpa/inet.yaml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ header_template: inet.h.def
33
macros: []
44
types:
55
- type_name: in_addr
6+
- type_name: in_addr_t
67
enums: []
78
objects: []
89
functions:
@@ -18,6 +19,12 @@ functions:
1819
return_type: uint16_t
1920
arguments:
2021
- type: uint16_t
22+
- name: inet_addr
23+
standards:
24+
- POSIX
25+
return_type: in_addr_t
26+
arguments:
27+
- type: const char *
2128
- name: inet_aton
2229
standards:
2330
- llvm_libc_ext

0 commit comments

Comments
 (0)