Commit 47eb85de by Tianqi Chen Committed by GitHub

[TEST] Upgrade gpu docker to cudnn7 (#306)

* [TEST] Upgrade gpu docker to cudnn7

* fx
parent 29338ea4
......@@ -330,11 +330,18 @@ def build(sch,
device_type = ndarray.context(device, 0).device_type
fhost = [ir_pass.BindDeviceType(x, device_type) for x in fhost]
fhost = [ir_pass.LowerTVMBuiltin(x) for x in fhost]
if not target_host and fdevice:
target_host = "llvm" if module.enabled("llvm") else "stackvm"
if fdevice:
fdevice = [ir_pass.LowerIntrin(x, target) for x in fdevice]
fhost = [ir_pass.LowerIntrin(x, target_host) for x in fhost]
else:
fhost = [ir_pass.LowerIntrin(x, target) for x in fhost]
fhost = [ir_pass.CombineContextCall(x) for x in fhost]
if fdevice:
if not target_host:
target_host = "llvm" if module.enabled("llvm") else "stackvm"
mhost = codegen.build_module(fhost, target_host)
if target:
mdev = codegen.build_module(fdevice, target)
......
......@@ -22,16 +22,11 @@ runtime::Module Build(const Array<LoweredFunc>& funcs,
mode = mode.substr(0, pos);
}
std::string build_f_name = "codegen.build_" + mode;
// Lower intrinsic functions
Array<LoweredFunc> func_list;
for (LoweredFunc f : funcs) {
func_list.push_back(ir::LowerIntrin(f, target));
}
// the build function.
const PackedFunc* bf = runtime::Registry::Get(build_f_name);
CHECK(bf != nullptr)
<< "Target " << target << " is not enabled";
runtime::Module m = (*bf)(func_list, target);
runtime::Module m = (*bf)(funcs, target);
return m;
}
......
......@@ -8,6 +8,7 @@
#include <tvm/ir_operator.h>
#include <tvm/ir_pass.h>
#include <tvm/buffer.h>
#include <tvm/target_info.h>
#include <tvm/runtime/device_api.h>
#include <unordered_map>
#include "./ir_util.h"
......@@ -110,6 +111,12 @@ class StorageFlattener : public IRMutator {
// use small alignment for small arrays
int32_t const_size = Allocate::constant_allocation_size(shape, key.GetName());
int align = GetTempAllocaAlignment(op->type, const_size);
if (skey.tag.length() != 0) {
MemoryInfo info = GetMemoryInfo(skey.to_string());
if (info.defined()) {
align = (info->max_simd_bits + op->type.bits() - 1) / op->type.bits();
}
}
e.buffer = BufferNode::make(
Var(key.GetName(), Handle()),
......
# For CPU
FROM ubuntu:14.04
FROM ubuntu:16.04
RUN apt-get update --fix-missing
......
# For CPU
FROM ubuntu:14.04
FROM ubuntu:16.04
RUN apt-get update --fix-missing
......
FROM nvidia/cuda:7.5-cudnn5-devel
FROM nvidia/cuda:8.0-cudnn7-devel
# Base scripts
RUN apt-get update --fix-missing
......
FROM ioft/i386-ubuntu:14.04
FROM ioft/i386-ubuntu:16.04
RUN apt-get update --fix-missing
......
# For lint test
FROM ubuntu:14.04
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y python-pip
RUN apt-get update && apt-get install -y python-pip sudo
RUN apt-get install -y doxygen graphviz
RUN pip install cpplint pylint
# install libraries for building c++ core on ubuntu
apt-get install -y --no-install-recommends --force-yes \
git make libgtest-dev cmake wget unzip libtinfo-dev libz-dev\
libcurl4-openssl-dev libopenblas-dev g++
libcurl4-openssl-dev libopenblas-dev g++ sudo
cd /usr/src/gtest && cmake CMakeLists.txt && make && cp *.a /usr/lib
apt-get update && apt-get install -y openjdk-7-jdk maven
apt-get update && apt-get install -y openjdk-8-jdk maven
echo deb http://apt.llvm.org/trusty/ llvm-toolchain-trusty-4.0 main\
echo deb http://apt.llvm.org/xenial/ llvm-toolchain-xenial-4.0 main\
>> /etc/apt/sources.list.d/llvm.list
echo deb-src http://apt.llvm.org/trusty/ llvm-toolchain-trusty-4.0 main\
echo deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial-4.0 main\
>> /etc/apt/sources.list.d/llvm.list
wget -O - http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
apt-get update && apt-get install -y --force-yes llvm-4.0
......@@ -18,7 +18,8 @@ def test_map():
assert a in amap
assert len(amap) == 2
dd = dict(amap.items())
assert str(dd) == str(amap)
assert a in dd
assert b in dd
assert a + 1 not in amap
def test_map_save_load_json():
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment