@@ -1354,10 +1354,10 @@ std::tuple<Tensor, Tensor, Tensor> layer_norm_cuda(
1354
1354
1355
1355
Tensor Y = at::native::empty_like (
1356
1356
*X,
1357
- c10 ::nullopt /* dtype */ ,
1358
- c10 ::nullopt /* layout */ ,
1359
- c10 ::nullopt /* device */ ,
1360
- c10 ::nullopt /* pin_memory */ ,
1357
+ std ::nullopt /* dtype */ ,
1358
+ std ::nullopt /* layout */ ,
1359
+ std ::nullopt /* device */ ,
1360
+ std ::nullopt /* pin_memory */ ,
1361
1361
LEGACY_CONTIGUOUS_MEMORY_FORMAT);
1362
1362
auto acc_type = at::toAccumulateType (input.scalar_type (), /* is_cuda=*/ true );
1363
1363
Tensor mean = at::empty ({M}, X->options ().dtype (acc_type));
@@ -1414,42 +1414,42 @@ std::tuple<Tensor, Tensor, Tensor> layer_norm_backward_cuda(
1414
1414
if (grad_input_mask[0 ]) {
1415
1415
dX = at::native::empty_like (
1416
1416
*X,
1417
- c10 ::nullopt /* dtype */ ,
1418
- c10 ::nullopt /* layout */ ,
1419
- c10 ::nullopt /* device */ ,
1420
- c10 ::nullopt /* pin_memory */ ,
1417
+ std ::nullopt /* dtype */ ,
1418
+ std ::nullopt /* layout */ ,
1419
+ std ::nullopt /* device */ ,
1420
+ std ::nullopt /* pin_memory */ ,
1421
1421
LEGACY_CONTIGUOUS_MEMORY_FORMAT);
1422
1422
}
1423
1423
if (grad_input_mask[1 ]) {
1424
1424
dgamma = M > 0 ? at::native::empty_like (
1425
1425
*gamma ,
1426
- c10 ::nullopt /* dtype */ ,
1427
- c10 ::nullopt /* layout */ ,
1428
- c10 ::nullopt /* device */ ,
1429
- c10 ::nullopt /* pin_memory */ ,
1426
+ std ::nullopt /* dtype */ ,
1427
+ std ::nullopt /* layout */ ,
1428
+ std ::nullopt /* device */ ,
1429
+ std ::nullopt /* pin_memory */ ,
1430
1430
LEGACY_CONTIGUOUS_MEMORY_FORMAT)
1431
1431
: at::native::zeros_like (
1432
1432
*gamma ,
1433
- c10 ::nullopt /* dtype */ ,
1434
- c10 ::nullopt /* layout */ ,
1435
- c10 ::nullopt /* device */ ,
1436
- c10 ::nullopt /* pin_memory */ ,
1433
+ std ::nullopt /* dtype */ ,
1434
+ std ::nullopt /* layout */ ,
1435
+ std ::nullopt /* device */ ,
1436
+ std ::nullopt /* pin_memory */ ,
1437
1437
LEGACY_CONTIGUOUS_MEMORY_FORMAT);
1438
1438
}
1439
1439
if (grad_input_mask[2 ]) {
1440
1440
dbeta = M > 0 ? at::native::empty_like (
1441
1441
*beta,
1442
- c10 ::nullopt /* dtype */ ,
1443
- c10 ::nullopt /* layout */ ,
1444
- c10 ::nullopt /* device */ ,
1445
- c10 ::nullopt /* pin_memory */ ,
1442
+ std ::nullopt /* dtype */ ,
1443
+ std ::nullopt /* layout */ ,
1444
+ std ::nullopt /* device */ ,
1445
+ std ::nullopt /* pin_memory */ ,
1446
1446
LEGACY_CONTIGUOUS_MEMORY_FORMAT)
1447
1447
: at::native::zeros_like (
1448
1448
*beta,
1449
- c10 ::nullopt /* dtype */ ,
1450
- c10 ::nullopt /* layout */ ,
1451
- c10 ::nullopt /* device */ ,
1452
- c10 ::nullopt /* pin_memory */ ,
1449
+ std ::nullopt /* dtype */ ,
1450
+ std ::nullopt /* layout */ ,
1451
+ std ::nullopt /* device */ ,
1452
+ std ::nullopt /* pin_memory */ ,
1453
1453
LEGACY_CONTIGUOUS_MEMORY_FORMAT);
1454
1454
}
1455
1455
if (M > 0 && N > 0 ) {
0 commit comments