mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-15 13:01:45 +08:00
Add interface to extract versioning info
Appened ocloc interface with new 'query' feature. Using this feature now one can extract HEAD hash and version of neo. Signed-off-by: Bushev, Dmitry <dmitry.bushev@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
4dda709b41
commit
9e18416098
@ -0,0 +1,41 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "driver_version.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#ifdef QTR
|
||||
#undef QTR
|
||||
#endif
|
||||
|
||||
#ifdef TOSTR
|
||||
#undef TOSTR
|
||||
#endif
|
||||
|
||||
#define QTR(a) #a
|
||||
#define TOSTR(b) QTR(b)
|
||||
|
||||
namespace NEO {
|
||||
|
||||
std::string getRevision() {
|
||||
#ifdef NEO_REVISION
|
||||
return NEO_REVISION;
|
||||
#else
|
||||
return "";
|
||||
#endif
|
||||
}
|
||||
|
||||
std::string getOclDriverVersion() {
|
||||
#ifdef NEO_OCL_DRIVER_VERSION
|
||||
return TOSTR(NEO_OCL_DRIVER_VERSION);
|
||||
#else
|
||||
return "";
|
||||
#endif
|
||||
}
|
||||
|
||||
} // namespace NEO
|
@ -0,0 +1,14 @@
|
||||
/*
|
||||
* Copyright (C) 2021 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
#include <string>
|
||||
|
||||
namespace NEO {
|
||||
extern std::string getRevision();
|
||||
extern std::string getOclDriverVersion();
|
||||
} // namespace NEO
|
Reference in New Issue
Block a user