Re enable test RTC (#1516)

Adding target resolution in hiprtc tests and reenable them.
此提交包含在:
Jatin Chaudhary
2019-10-10 19:59:55 +05:30
提交者 Maneesh Gupta
父節點 3ae52f86b1
當前提交 32eb6d3bec
共有 3 個檔案被更改,包括 33 行新增6 行删除
+11 -2
查看文件
@@ -20,7 +20,7 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
*/
/* HIT_START
* BUILD: %t %s ../test_common.cpp LINK_OPTIONS hiprtc EXCLUDE_HIP_PLATFORM all
* BUILD: %t %s ../test_common.cpp LINK_OPTIONS hiprtc EXCLUDE_HIP_PLATFORM nvcc
* TEST: %t
* HIT_END
*/
@@ -66,7 +66,16 @@ int main()
nullptr, // headers
nullptr); // includeNames
hiprtcResult compileResult{hiprtcCompileProgram(prog, 0, nullptr)};
hipDeviceProp_t props;
int device = 0;
hipGetDeviceProperties(&props, device);
std::string gfxName = "gfx" + std::to_string(props.gcnArch);
std::string sarg = "--gpu-architecture=" + gfxName;
const char* options[] = {
sarg.c_str()
};
hiprtcResult compileResult{hiprtcCompileProgram(prog, 1, options)};
size_t logSize;
hiprtcGetProgramLogSize(prog, &logSize);