[v0.22] Small various fixes

This commit is contained in:
Dr-Noob
2021-12-28 16:43:11 +01:00
parent 98a70d5c9e
commit 6f555f1b47
5 changed files with 13 additions and 11 deletions

View File

@@ -18,13 +18,13 @@ fi
# - set CMAKE_CUDA_COMPILER to your nvcc binary:
# - set CMAKE_CUDA_COMPILER_TOOLKIT_ROOT to the CUDA root dir
# for example:
# cmake -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc -DCMAKE_CUDA_COMPILER_TOOLKIT_ROOT=/usr/local/cuda/ ..
# cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DCMAKE_CUDA_COMPILER=/usr/local/cuda/bin/nvcc -DCMAKE_CUDA_COMPILER_TOOLKIT_ROOT=/usr/local/cuda/ ..
# In case you want to explicitely disable a backend, you can:
# Disable CUDA backend:
# cmake -DENABLE_CUDA_BACKEND=OFF ..
# cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DENABLE_CUDA_BACKEND=OFF ..
# Disable Intel backend:
# cmake -DENABLE_INTEL_BACKEND=OFF ..
# cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DENABLE_INTEL_BACKEND=OFF ..
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
make -j$(nproc)

View File

@@ -60,18 +60,20 @@ struct memory {
};
struct gpu_info {
int32_t idx;
VENDOR vendor;
struct uarch* arch;
char* name;
int64_t freq;
struct pci* pci;
struct topology_c* topo_c;
struct topology_i* topo_i;
int64_t peak_performance;
// CUDA specific
int64_t peak_performance_tcu;
struct memory* mem;
struct cache* cach;
int64_t peak_performance;
int64_t peak_performance_tcu;
int32_t idx;
struct topology_c* topo_c;
// Intel specific
struct topology_i* topo_i;
};
VENDOR get_gpu_vendor(struct gpu_info* gpu);

View File

@@ -8,7 +8,7 @@
#include "../cuda/cuda.hpp"
#include "../cuda/uarch.hpp"
static const char* VERSION = "0.21";
static const char* VERSION = "0.22";
void print_help(char *argv[]) {
const char **t = args_str;

View File

@@ -43,7 +43,7 @@ struct gpu_info* get_gpu_info_intel() {
bool print_gpu_intel(struct gpu_info* gpu) {
if(gpu->vendor != GPU_VENDOR_INTEL) return false;
printf("Intel %s\n", gpu->name);
printf("%s\n", gpu->name);
return true;
}

View File

@@ -166,7 +166,7 @@ struct uarch* get_uarch_from_pci(struct pci* pci) {
char* get_name_from_uarch(struct uarch* arch) {
char* name = (char *) emalloc(sizeof(char) * (strlen(arch->chip_str) + 6 + 1));
sprintf(name, "Intel %s", arch->chip_str);
sprintf(name, "%s", arch->chip_str);
return name;
}