1a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard//===------- AMDILNIDevice.h - Define NI Device for AMDIL -*- C++ -*------===// 2a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard// 3a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard// The LLVM Compiler Infrastructure 4a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard// 5a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard// This file is distributed under the University of Illinois Open Source 6a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard// License. See LICENSE.TXT for details. 7a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard// 8a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard//==-----------------------------------------------------------------------===// 9a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard// 10a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard// Interface for the subtarget data classes. 11a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard// 12a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard//===---------------------------------------------------------------------===// 13a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard// This file will define the interface that each generation needs to 14a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard// implement in order to correctly answer queries on the capabilities of the 15a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard// specific hardware. 16a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard//===---------------------------------------------------------------------===// 17a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard#ifndef _AMDILNIDEVICE_H_ 18a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard#define _AMDILNIDEVICE_H_ 19a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard#include "AMDILEvergreenDevice.h" 20b72ab79d73b29ec087d90cf2c698adbab4db5defTom Stellard#include "AMDGPUSubtarget.h" 21a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard 22a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellardnamespace llvm { 23b72ab79d73b29ec087d90cf2c698adbab4db5defTom Stellard class AMDGPUSubtarget; 24a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard//===---------------------------------------------------------------------===// 25a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard// NI generation of devices and their respective sub classes 26a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard//===---------------------------------------------------------------------===// 27a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard 282f921101c0826dc52a2c69f85c3da0f7f6e8212aTom Stellard// The AMDGPUNIDevice is the base class for all Northern Island series of 292f921101c0826dc52a2c69f85c3da0f7f6e8212aTom Stellard// cards. It is very similiar to the AMDGPUEvergreenDevice, with the major 30a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard// exception being differences in wavefront size and hardware capabilities. The 31a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard// NI devices are all 64 wide wavefronts and also add support for signed 24 bit 32a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard// integer operations 33a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard 342f921101c0826dc52a2c69f85c3da0f7f6e8212aTom Stellard class AMDGPUNIDevice : public AMDGPUEvergreenDevice { 35a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard public: 362f921101c0826dc52a2c69f85c3da0f7f6e8212aTom Stellard AMDGPUNIDevice(AMDGPUSubtarget*); 372f921101c0826dc52a2c69f85c3da0f7f6e8212aTom Stellard virtual ~AMDGPUNIDevice(); 38a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard virtual size_t getMaxLDSSize() const; 39a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard virtual uint32_t getGeneration() const; 40a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard protected: 412f921101c0826dc52a2c69f85c3da0f7f6e8212aTom Stellard }; // AMDGPUNIDevice 42a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard 432f921101c0826dc52a2c69f85c3da0f7f6e8212aTom Stellard// Just as the AMDGPUCypressDevice is the double capable version of the 442f921101c0826dc52a2c69f85c3da0f7f6e8212aTom Stellard// AMDGPUEvergreenDevice, the AMDGPUCaymanDevice is the double capable version of 452f921101c0826dc52a2c69f85c3da0f7f6e8212aTom Stellard// the AMDGPUNIDevice. The other major difference that is not as useful from 46a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard// standpoint is that the Cayman Device has 4 wide ALU's, whereas the rest of the 47a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard// NI family is a 5 wide. 48a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard 492f921101c0826dc52a2c69f85c3da0f7f6e8212aTom Stellard class AMDGPUCaymanDevice: public AMDGPUNIDevice { 50a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard public: 512f921101c0826dc52a2c69f85c3da0f7f6e8212aTom Stellard AMDGPUCaymanDevice(AMDGPUSubtarget*); 522f921101c0826dc52a2c69f85c3da0f7f6e8212aTom Stellard virtual ~AMDGPUCaymanDevice(); 53a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard private: 54a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard virtual void setCaps(); 552f921101c0826dc52a2c69f85c3da0f7f6e8212aTom Stellard }; // AMDGPUCaymanDevice 56a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard 572f921101c0826dc52a2c69f85c3da0f7f6e8212aTom Stellard static const unsigned int MAX_LDS_SIZE_900 = AMDGPUDevice::MAX_LDS_SIZE_800; 58a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard} // namespace llvm 59a75c6163e605f35b14f26930dd9227e4f337ec9eTom Stellard#endif // _AMDILNIDEVICE_H_ 60