Skip to content

Commit

Permalink
merge g1 with master fix: x86_64 -> x64
Browse files Browse the repository at this point in the history
Update profiler.cpp
  • Loading branch information
archibate committed Feb 26, 2020
1 parent 6128d7a commit 1d231d6
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions taichi/program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -43,29 +43,29 @@ Program::Program(Arch arch) {
#if !defined(TI_WITH_CUDA)
if (arch == Arch::cuda) {
TI_WARN("Taichi is not compiled with CUDA.");
TI_WARN("Falling back to x86_64");
TI_WARN("Falling back to x64");
arch = Arch::x64;
}
#else
if (!cuda_context) {
cuda_context = std::make_unique<CUDAContext>();
if (!cuda_context->detected()) {
TI_WARN("No CUDA device detected.");
TI_WARN("Falling back to x86_64");
TI_WARN("Falling back to x64");
arch = Arch::x64;
}
}
#endif
if (arch == Arch::metal) {
if (!metal::is_metal_api_available()) {
TI_WARN("No Metal API detected, falling back to x86_64");
TI_WARN("No Metal API detected, falling back to x64");
arch = Arch::x64;
}
}
if (arch == Arch::opengl) {
if (!opengl::is_opengl_api_available()) {
TI_WARN("No OpenGL API detected, falling back to x86_64");
arch = Arch::x86_64;
TI_WARN("No OpenGL API detected, falling back to x64");
arch = Arch::x64;
}
}
memory_pool = std::make_unique<MemoryPool>(this);
Expand Down Expand Up @@ -197,7 +197,7 @@ void Program::initialize_runtime_system(StructCompiler *scomp) {
}

void Program::materialize_layout() {
// always use arch=x86_64 since this is for host accessors
// always use arch=x64 since this is for host accessors
// TODO: arch may also be arm etc.
std::unique_ptr<StructCompiler> scomp = StructCompiler::make(this, Arch::x64);
scomp->run(*snode_root, true);
Expand Down

0 comments on commit 1d231d6

Please sign in to comment.