update akg && set random seed for stitch case

This commit is contained in:
r1chardf1d0 2021-05-17 11:02:22 +08:00
parent b1be842d2b
commit 6609f706fe
5 changed files with 5 additions and 2 deletions

2
akg

@ -1 +1 @@
Subproject commit f1b98639da49b0ff6a9aed61bc564f08c040fca4
Subproject commit e869bb0010f9fc071a94f8def23655ce0acad2d2

View File

@ -136,7 +136,7 @@ def _set_graph_kernel_context(device_target, enable_graph_kernel, is_auto_enable
if enable_graph_kernel == "true" or is_auto_enable_graph_kernel:
if device_target == 'GPU':
context.set_context(enable_graph_kernel=True,
graph_kernel_flags="--enable_stitch_fusion=true --enable_parallel_fusion=true")
graph_kernel_flags="--enable_stitch_fusion=false --enable_parallel_fusion=true")
else:
logger.warning('Graph kernel only supports GPU back-end now, run with graph kernel off.')

View File

@ -73,6 +73,7 @@ def get_dropoutgrad_reducesum_output(x, y, z, enable_stitch_fusion):
def test_dropoutgrad_reducesum(shape, dtype):
np.random.seed(0)
x = Tensor(np.random.normal(0, 1, shape).astype(dtype))
y = Tensor(np.random.normal(0, 1, shape).astype(dtype))
z = Tensor(np.random.normal(0, 1, shape).astype(dtype))

View File

@ -70,6 +70,7 @@ def get_layernorm_output(x, y, z, enable_stitch_fusion):
def test_layernorm(shape1, shape2, dtype):
np.random.seed(0)
x = Tensor(np.random.normal(0, 1, shape1).astype(dtype))
y = Tensor(np.random.normal(0, 1, shape1).astype(dtype))
z = Tensor(np.random.normal(0, 1, shape2).astype(dtype))

View File

@ -77,6 +77,7 @@ def get_softmax_output(x, y, enable_stitch_fusion):
def test_softmax(shape, dtype):
np.random.seed(0)
x = Tensor(np.random.normal(0, 1, shape).astype(dtype))
y = Tensor(np.random.normal(0, 1, shape).astype(dtype))
expect = get_softmax_output(x, y, False)