[v0.22] Small various fixes
This commit is contained in:
6
build.sh
6
build.sh
@@ -18,13 +18,13 @@ fi
|
|||||||
# - set CMAKE_CUDA_COMPILER to your nvcc binary:
|
# - set CMAKE_CUDA_COMPILER to your nvcc binary:
|
||||||
# - set CMAKE_CUDA_COMPILER_TOOLKIT_ROOT to the CUDA root dir
|
# - set CMAKE_CUDA_COMPILER_TOOLKIT_ROOT to the CUDA root dir
|
||||||
# for example:
|
# 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:
|
# In case you want to explicitely disable a backend, you can:
|
||||||
# Disable CUDA backend:
|
# Disable CUDA backend:
|
||||||
# cmake -DENABLE_CUDA_BACKEND=OFF ..
|
# cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DENABLE_CUDA_BACKEND=OFF ..
|
||||||
# Disable Intel backend:
|
# Disable Intel backend:
|
||||||
# cmake -DENABLE_INTEL_BACKEND=OFF ..
|
# cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE -DENABLE_INTEL_BACKEND=OFF ..
|
||||||
|
|
||||||
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
|
cmake -DCMAKE_BUILD_TYPE=$BUILD_TYPE ..
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
|
|||||||
@@ -60,18 +60,20 @@ struct memory {
|
|||||||
};
|
};
|
||||||
|
|
||||||
struct gpu_info {
|
struct gpu_info {
|
||||||
|
int32_t idx;
|
||||||
VENDOR vendor;
|
VENDOR vendor;
|
||||||
struct uarch* arch;
|
struct uarch* arch;
|
||||||
char* name;
|
char* name;
|
||||||
int64_t freq;
|
int64_t freq;
|
||||||
struct pci* pci;
|
struct pci* pci;
|
||||||
struct topology_c* topo_c;
|
int64_t peak_performance;
|
||||||
struct topology_i* topo_i;
|
// CUDA specific
|
||||||
|
int64_t peak_performance_tcu;
|
||||||
struct memory* mem;
|
struct memory* mem;
|
||||||
struct cache* cach;
|
struct cache* cach;
|
||||||
int64_t peak_performance;
|
struct topology_c* topo_c;
|
||||||
int64_t peak_performance_tcu;
|
// Intel specific
|
||||||
int32_t idx;
|
struct topology_i* topo_i;
|
||||||
};
|
};
|
||||||
|
|
||||||
VENDOR get_gpu_vendor(struct gpu_info* gpu);
|
VENDOR get_gpu_vendor(struct gpu_info* gpu);
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
#include "../cuda/cuda.hpp"
|
#include "../cuda/cuda.hpp"
|
||||||
#include "../cuda/uarch.hpp"
|
#include "../cuda/uarch.hpp"
|
||||||
|
|
||||||
static const char* VERSION = "0.21";
|
static const char* VERSION = "0.22";
|
||||||
|
|
||||||
void print_help(char *argv[]) {
|
void print_help(char *argv[]) {
|
||||||
const char **t = args_str;
|
const char **t = args_str;
|
||||||
|
|||||||
@@ -43,7 +43,7 @@ struct gpu_info* get_gpu_info_intel() {
|
|||||||
bool print_gpu_intel(struct gpu_info* gpu) {
|
bool print_gpu_intel(struct gpu_info* gpu) {
|
||||||
if(gpu->vendor != GPU_VENDOR_INTEL) return false;
|
if(gpu->vendor != GPU_VENDOR_INTEL) return false;
|
||||||
|
|
||||||
printf("Intel %s\n", gpu->name);
|
printf("%s\n", gpu->name);
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -166,7 +166,7 @@ struct uarch* get_uarch_from_pci(struct pci* pci) {
|
|||||||
|
|
||||||
char* get_name_from_uarch(struct uarch* arch) {
|
char* get_name_from_uarch(struct uarch* arch) {
|
||||||
char* name = (char *) emalloc(sizeof(char) * (strlen(arch->chip_str) + 6 + 1));
|
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;
|
return name;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user