Skip to content

Commit 6064439

Browse files
committed
Fix merge conflicts
1 parent ab55758 commit 6064439

File tree

23 files changed

+2
-536
lines changed

23 files changed

+2
-536
lines changed
Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1 @@
1-
<<<<<<< HEAD
2-
56765e8c1f6490e21312b46242ed78cb2dd46d35
3-
=======
41
fccfc522864cf8bc172abe0cd58ae5581e2d44b9
5-
>>>>>>> upstream/main

.ci/docker/requirements-ci.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -111,15 +111,8 @@ ninja==1.11.1.3
111111
#Pinned versions: 1.11.1.3
112112
#test that import: run_test.py, test_cpp_extensions_aot.py,test_determination.py
113113

114-
<<<<<<< HEAD
115114
numba==0.60.0 ; python_version == "3.9"
116115
numba==0.61.2 ; python_version > "3.9"
117-
=======
118-
numba==0.49.0 ; python_version < "3.9" and platform_machine != "s390x"
119-
numba==0.55.2 ; python_version == "3.9" and platform_machine != "s390x"
120-
numba==0.55.2 ; python_version == "3.10" and platform_machine != "s390x"
121-
numba==0.60.0 ; python_version == "3.12" and platform_machine != "s390x"
122-
>>>>>>> upstream/main
123116
#Description: Just-In-Time Compiler for Numerical Functions
124117
#Pinned versions: 0.54.1, 0.49.0, <=0.49.1
125118
#test that import: test_numba_integration.py

aten/src/ATen/Context.cpp

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -615,34 +615,12 @@ at::ROCmFABackend Context::getROCmFAPreferredBackend() {
615615

616616
void Context::setROCmFAPreferredBackend(at::ROCmFABackend b) {
617617
#ifdef USE_ROCM
618-
<<<<<<< HEAD
619-
if(b == at::ROCmFABackend::Ck) {
620-
static const bool ck_unsupported = []() {
621-
static const std::vector<std::string> archs = {
622-
"gfx90a", "gfx942", "gfx950"
623-
};
624-
for (auto index: c10::irange(detail::getCUDAHooks().deviceCount())) {
625-
if (!detail::getCUDAHooks().isGPUArch(archs, index)) {
626-
TORCH_WARN_ONCE(
627-
"Attempting to use CK on an unsupported architecture! Cannot set backend to CK");
628-
return true;
629-
}
630-
}
631-
return false;
632-
}();
633-
if(!ck_unsupported) rocm_fa_preferred_backend = b;
634-
}
635-
else {
636-
rocm_fa_preferred_backend = b;
637-
}
638-
=======
639618
static const bool hasCKSDPAFlag = hasCKSDPA();
640619
static const bool ckSupportedFlag = ckSupported();
641620
TORCH_CHECK((b != at::ROCmFABackend::Ck) || (hasCKSDPAFlag && ckSupportedFlag),
642621
"Cannot set preferred SDPA backend to CK since following conditions are not true: ",
643622
"architecture supported for CK: ", ckSupportedFlag,
644623
", PyTorch built with CK SDPA support: ", hasCKSDPAFlag);
645-
>>>>>>> upstream/main
646624
#endif
647625
rocm_fa_preferred_backend = b;
648626
}

aten/src/ATen/cuda/detail/OffsetCalculator.cuh

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -49,20 +49,12 @@ struct OffsetCalculator {
4949
#if defined(USE_ROCM)
5050
if ((dims > 0) && (dims <= 2)) {
5151
auto divmod = sizes_[0].divmod(linear_idx);
52-
<<<<<<< HEAD
53-
#pragma unroll
54-
=======
5552
#pragma unroll
56-
>>>>>>> upstream/main
5753
for (int arg = 0; arg < NARGS; arg++)
5854
offsets[arg] = divmod.mod * strides_[0][arg];
5955
if (dims >= 2) {
6056
divmod = sizes_[1].divmod(divmod.div);
61-
<<<<<<< HEAD
62-
#pragma unroll
63-
=======
6457
#pragma unroll
65-
>>>>>>> upstream/main
6658
for (int arg = 0; arg < NARGS; arg++)
6759
offsets[arg] += divmod.mod * strides_[1][arg];
6860
}

aten/src/ATen/cuda/tunable/GemmHipblaslt.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -91,10 +91,6 @@ constexpr hipDataType HipDataTypeFor<c10::Float4_e2m1fn_x2>() {
9191
#if ROCM_VERSION >= 70000
9292
return HIP_R_4F_E2M1;
9393
#else
94-
<<<<<<< HEAD
95-
// Return HIP_R_4F_E2M1 enum value for earlier ROCm version.
96-
=======
97-
>>>>>>> upstream/main
9894
return static_cast<hipDataType>(33);
9995
#endif
10096
}

aten/src/ATen/native/ConvUtils.h

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -362,18 +362,12 @@ inline at::MemoryFormat miopen_conv_suggest_memory_format(const at::Tensor& inpu
362362
}
363363

364364
// TODO: Remove PYTORCH_MIOPEN_SUGGEST_NHWC once ROCm officially supports NHWC in MIOpen
365-
<<<<<<< HEAD
366-
// See #64427
367-
static std::optional<bool> PYTORCH_MIOPEN_SUGGEST_NHWC = c10::utils::check_env("PYTORCH_MIOPEN_SUGGEST_NHWC");
368-
static bool suggest_nhwc = PYTORCH_MIOPEN_SUGGEST_NHWC && *PYTORCH_MIOPEN_SUGGEST_NHWC;
369-
=======
370365
// See https://github.com/pytorch/pytorch/issues/64427.
371366
// non static variable is used to be able to change environment variable in runtime for testing
372367
// enabled by default for ROCm >= 7.0.0 with miopen 3.5
373368
int miopen_version = detail::getCUDAHooks().compiledWithMIOpen() ? detail::getCUDAHooks().versionMIOpen() : 0;
374369
bool is_miopen_3_5 = miopen_version >= 30500; // ROCm 7.0
375370
bool suggest_nhwc = c10::utils::check_env("PYTORCH_MIOPEN_SUGGEST_NHWC").value_or(is_miopen_3_5);
376-
>>>>>>> upstream/main
377371

378372
auto input_memory_format = input.suggest_memory_format();
379373
auto weight_memory_format = weight.suggest_memory_format();
@@ -383,23 +377,17 @@ inline at::MemoryFormat miopen_conv_suggest_memory_format(const at::Tensor& inpu
383377
(input_memory_format == at::MemoryFormat::ChannelsLast) ||
384378
(weight_memory_format == at::MemoryFormat::ChannelsLast)
385379
);
386-
<<<<<<< HEAD
387-
=======
388380
if (can_use_miopen_channels_last_2d) {
389381
return at::MemoryFormat::ChannelsLast;
390382
}
391-
>>>>>>> upstream/main
392383

393384
bool can_use_miopen_channels_last_3d = suggest_nhwc && (weight_ndim == 5) && (
394385
(input_memory_format == at::MemoryFormat::ChannelsLast3d) ||
395386
(weight_memory_format == at::MemoryFormat::ChannelsLast3d)
396387
);
397-
<<<<<<< HEAD
398-
=======
399388
if (can_use_miopen_channels_last_3d) {
400389
return at::MemoryFormat::ChannelsLast3d;
401390
}
402-
>>>>>>> upstream/main
403391

404392
return at::MemoryFormat::Contiguous;
405393
}

aten/src/ATen/native/Convolution.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1406,15 +1406,8 @@ static inline at::MemoryFormat determine_backend_memory_format(
14061406
case ConvBackend::Miopen:
14071407
case ConvBackend::MiopenDepthwise:
14081408
case ConvBackend::MiopenTranspose:
1409-
<<<<<<< HEAD
1410-
if (detail::getCUDAHooks().compiledWithMIOpen() && miopen_conv_use_channels_last(input, weight)) {
1411-
TORCH_INTERNAL_ASSERT((k == 4 || k == 5),
1412-
"Expected 4D or 5D input for miopen memory format selection in determine_backend_memory_format()");
1413-
backend_memory_format = (k == 5) ? at::MemoryFormat::ChannelsLast3d : at::MemoryFormat::ChannelsLast;
1414-
=======
14151409
if (detail::getCUDAHooks().compiledWithMIOpen()) {
14161410
backend_memory_format = miopen_conv_suggest_memory_format(input, weight);
1417-
>>>>>>> upstream/main
14181411
}
14191412
break;
14201413
case ConvBackend::Mkldnn:

aten/src/ATen/native/Normalization.cpp

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -537,20 +537,13 @@ BatchNormBackend _select_batch_norm_backend(
537537
}
538538

539539
// TODO: Remove PYTORCH_MIOPEN_SUGGEST_NHWC_BATCHNORM once ROCm officially supports NHWC in MIOpen
540-
<<<<<<< HEAD
541-
// See #64427
542-
// non static variable is used to be able to change environment variable in runtime for testing
543-
// enabled by default for ROCm >= 7.0.0
544-
bool PYTORCH_MIOPEN_SUGGEST_NHWC_BATCHNORM = c10::utils::check_env("PYTORCH_MIOPEN_SUGGEST_NHWC_BATCHNORM").value_or(ROCM_VERSION >= 70000);
545-
=======
546540
// See https://github.com/pytorch/pytorch/issues/64427.
547541
// non static variable is used to be able to change environment variable in runtime for testing
548542
// enabled by default for ROCm >= 7.0.0 with miopen 3.5
549543
int miopen_version = detail::getCUDAHooks().compiledWithMIOpen() ? detail::getCUDAHooks().versionMIOpen() : 0;
550544
bool is_miopen_3_4 = miopen_version >= 30400; // ROCm 6.4
551545
bool is_miopen_3_5 = miopen_version >= 30500; // ROCm 7.0
552546
bool PYTORCH_MIOPEN_SUGGEST_NHWC_BATCHNORM = c10::utils::check_env("PYTORCH_MIOPEN_SUGGEST_NHWC_BATCHNORM").value_or(is_miopen_3_5);
553-
>>>>>>> upstream/main
554547

555548
if (
556549
detail::getCUDAHooks().compiledWithMIOpen()
@@ -565,17 +558,9 @@ BatchNormBackend _select_batch_norm_backend(
565558
&& ((running_mean.defined() && running_var.defined())
566559
|| (!running_mean.defined() && !running_var.defined() && training))
567560
&& (input.suggest_memory_format() == MemoryFormat::Contiguous
568-
<<<<<<< HEAD
569-
#if (defined(USE_ROCM) && ROCM_VERSION >= 60500)
570-
|| (input.suggest_memory_format() == MemoryFormat::ChannelsLast && PYTORCH_MIOPEN_SUGGEST_NHWC_BATCHNORM)
571-
|| (input.suggest_memory_format() == MemoryFormat::ChannelsLast3d && PYTORCH_MIOPEN_SUGGEST_NHWC_BATCHNORM)
572-
#endif
573-
)
574-
=======
575561
|| (is_miopen_3_5 && PYTORCH_MIOPEN_SUGGEST_NHWC_BATCHNORM &&
576562
(input.suggest_memory_format() == MemoryFormat::ChannelsLast
577563
|| input.suggest_memory_format() == MemoryFormat::ChannelsLast3d)))
578-
>>>>>>> upstream/main
579564
) {
580565
return BatchNormBackend::Miopen;
581566
}

aten/src/ATen/native/cuda/Blas.cpp

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1300,17 +1300,10 @@ _scaled_mm_out_cuda(const Tensor& mat1, const Tensor& mat2,
13001300
TORCH_CHECK(ROCM_VERSION >= 70000, "Float4_e2m1fn_x2 is only supported for ROCm 7.0 and above");
13011301
}
13021302
if (mat1.scalar_type() == ScalarType::Float8_e5m2 || mat2.scalar_type() == ScalarType::Float8_e5m2) {
1303-
<<<<<<< HEAD
1304-
TORCH_CHECK(ROCM_VERSION >= 60000, "Float8_e5m2 is only supported for ROCm 6.0 and above");
1305-
}
1306-
if (mat1.scalar_type() == ScalarType::Float8_e4m3fn || mat2.scalar_type() == ScalarType::Float8_e4m3fn) {
1307-
TORCH_CHECK(ROCM_VERSION >= 60000, "Float8_e4m3fn is only supported for ROCm 6.0 and above");
1308-
=======
13091303
TORCH_CHECK(ROCM_VERSION >= 60500, "Float8_e5m2 is only supported for ROCm 6.5 and above");
13101304
}
13111305
if (mat1.scalar_type() == ScalarType::Float8_e4m3fn || mat2.scalar_type() == ScalarType::Float8_e4m3fn) {
13121306
TORCH_CHECK(ROCM_VERSION >= 60500, "Float8_e4m3fn is only supported for ROCm 6.5 and above");
1313-
>>>>>>> upstream/main
13141307
}
13151308
#endif
13161309
if (bias) {

0 commit comments

Comments
 (0)