mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary: Following up on this: https://github.com/pytorch/pytorch/pull/35851 cross dtype storage copy is not being used internally, so I have not included cross dtype copy for complex. Pull Request resolved: https://github.com/pytorch/pytorch/pull/35771 Differential Revision: D21319650 Pulled By: anjali411 fbshipit-source-id: 07c72996ee598eba0cf401ad61534494d6f5b5b3
63 lines
2.5 KiB
C
63 lines
2.5 KiB
C
#ifndef THCP_STORAGE_INC
|
|
#define THCP_STORAGE_INC
|
|
|
|
#define THCPStorageStr TH_CONCAT_STRING_3(torch.cuda.,Real,Storage)
|
|
#define THCPStorageClass TH_CONCAT_3(THCP,Real,StorageClass)
|
|
#define THCPStorage_(NAME) TH_CONCAT_4(THCP,Real,Storage_,NAME)
|
|
|
|
#define THCPDoubleStorage_Check(obj) \
|
|
PyObject_IsInstance(obj, THCPDoubleStorageClass)
|
|
#define THCPFloatStorage_Check(obj) \
|
|
PyObject_IsInstance(obj, THCPFloatStorageClass)
|
|
#define THCPHalfStorage_Check(obj) \
|
|
PyObject_IsInstance(obj, THCPHalfStorageClass)
|
|
#define THCPLongStorage_Check(obj) \
|
|
PyObject_IsInstance(obj, THCPLongStorageClass)
|
|
#define THCPIntStorage_Check(obj) \
|
|
PyObject_IsInstance(obj, THCPIntStorageClass)
|
|
#define THCPShortStorage_Check(obj) \
|
|
PyObject_IsInstance(obj, THCPShortStorageClass)
|
|
#define THCPCharStorage_Check(obj) \
|
|
PyObject_IsInstance(obj, THCPCharStorageClass)
|
|
#define THCPByteStorage_Check(obj) \
|
|
PyObject_IsInstance(obj, THCPByteStorageClass)
|
|
#define THCPBoolStorage_Check(obj) \
|
|
PyObject_IsInstance(obj, THCPBoolStorageClass)
|
|
#define THCPBFloat16Storage_Check(obj) \
|
|
PyObject_IsInstance(obj, THCPBFloat16StorageClass)
|
|
#define THCPComplexDoubleStorage_Check(obj) \
|
|
PyObject_IsInstance(obj, THCPDoubleStorageClass)
|
|
#define THCPComplexFloatStorage_Check(obj) \
|
|
PyObject_IsInstance(obj, THCPFloatStorageClass)
|
|
|
|
#define THCPDoubleStorage_CData(obj) (obj)->cdata
|
|
#define THCPFloatStorage_CData(obj) (obj)->cdata
|
|
#define THCPLongStorage_CData(obj) (obj)->cdata
|
|
#define THCPIntStorage_CData(obj) (obj)->cdata
|
|
#define THCPShortStorage_CData(obj) (obj)->cdata
|
|
#define THCPCharStorage_CData(obj) (obj)->cdata
|
|
#define THCPByteStorage_CData(obj) (obj)->cdata
|
|
#define THCPBoolStorage_CData(obj) (obj)->cdata
|
|
#define THCPBFloat16Storage_CData(obj) (obj)->cdata
|
|
#define THCPComplexDoubleStorage_CData(obj) (obj)->cdata
|
|
#define THCPComplexFloatStorage_CData(obj) (obj)->cdata
|
|
|
|
#define THCPStorageType TH_CONCAT_3(THCP,Real,StorageType)
|
|
#define THCPStorageBaseStr TH_CONCAT_STRING_3(Cuda,Real,StorageBase)
|
|
|
|
#include <torch/csrc/cuda/override_macros.h>
|
|
|
|
#define THC_GENERIC_FILE "torch/csrc/generic/Storage.h"
|
|
#include <THC/THCGenerateAllTypes.h>
|
|
|
|
#define THC_GENERIC_FILE "torch/csrc/generic/Storage.h"
|
|
#include <THC/THCGenerateComplexTypes.h>
|
|
|
|
#define THC_GENERIC_FILE "torch/csrc/generic/Storage.h"
|
|
#include <THC/THCGenerateBoolType.h>
|
|
|
|
#define THC_GENERIC_FILE "torch/csrc/generic/Storage.h"
|
|
#include <THC/THCGenerateBFloat16Type.h>
|
|
|
|
#endif
|