mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
[pytorch] add missing host-device attribute to fix clang build (#37358)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/37358 Test Plan: ```lang=bash buck build mode/opt -c fbcode.cuda_use_clang=true //vision/fair/detectron2/tools:benchmark ``` Reviewed By: ngimel Differential Revision: D21262235 fbshipit-source-id: 00633352d87da0881b2cc90759265fa0d0bd96be
This commit is contained in:
parent
fae87908d9
commit
f1e89fbe53
|
|
@ -1,6 +1,8 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
#include <c10/macros/Macros.h>
|
||||||
|
|
||||||
namespace c10 {
|
namespace c10 {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -10,7 +12,7 @@ struct alignas(4) qint32 {
|
||||||
using underlying = int32_t;
|
using underlying = int32_t;
|
||||||
int32_t val_;
|
int32_t val_;
|
||||||
qint32() = default;
|
qint32() = default;
|
||||||
explicit qint32(int32_t val) : val_(val) {}
|
C10_HOST_DEVICE explicit qint32(int32_t val) : val_(val) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace c10
|
} // namespace c10
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
#include <c10/macros/Macros.h>
|
||||||
|
|
||||||
namespace c10 {
|
namespace c10 {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -12,7 +14,7 @@ struct alignas(1) qint8 {
|
||||||
using underlying = int8_t;
|
using underlying = int8_t;
|
||||||
int8_t val_;
|
int8_t val_;
|
||||||
qint8() = default;
|
qint8() = default;
|
||||||
explicit qint8(int8_t val) : val_(val) {}
|
C10_HOST_DEVICE explicit qint8(int8_t val) : val_(val) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace c10
|
} // namespace c10
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
#pragma once
|
#pragma once
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
|
||||||
|
#include <c10/macros/Macros.h>
|
||||||
|
|
||||||
namespace c10 {
|
namespace c10 {
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -10,7 +12,7 @@ struct alignas(1) quint8 {
|
||||||
using underlying = uint8_t;
|
using underlying = uint8_t;
|
||||||
uint8_t val_;
|
uint8_t val_;
|
||||||
quint8() = default;
|
quint8() = default;
|
||||||
explicit quint8(uint8_t val) : val_(val) {}
|
C10_HOST_DEVICE explicit quint8(uint8_t val) : val_(val) {}
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace c10
|
} // namespace c10
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user