CINN icon indicating copy to clipboard operation
CINN copied to clipboard

Compiler Infrastructure for Neural Networks

Results 100 CINN issues
Sort by recently updated
recently updated
newest added

此PR通过举例说明了在不使用Schedule时,初始的Conv2d Compute在cuda端会生成两个kernels 单测结果: ``` I0601 11:14:21.862107 52538 codegen_cuda_dev_test.cc:673] func number is : 2 I0601 11:14:21.862145 52538 codegen_cuda_dev_test.cc:676] func is : function schedule_conv2d_0 (_X, _input_pad) { for (j, 0, 128) {...

此pr修改了cinn_call_cuda_kernel函数的参数,使其能够传入String字符串作为参数。 需注意,在llvm中注册变量的var_name必须以"__ptr"为结尾,以让CINN能够识别它将会被转化为int8*类型。

Add some documents for CINN low-level IR.

新增`ReductionRewrite`。 以一种无需原子就能实现的方式重写reduction:将一个reduction操作重写为两个。 将: ``` f32[B] out = reduce(f32[A, B, C] input, dimensions={0, 2}) ``` 重写为: ``` f32[A, B] tmp = reduce(f32[A, B, C] input, dimensions={2}) f32[B] out = reduce(f32[A, B]...

paddle gpu计算使用了相同的计算流,因此可以共享使用同一个workspace。pr使用了shared_ptr管理共享的workspace,能够实现智能的指针管理。由于不同计算需要workspace大小不一样,因此会需要修改workspace的空间,子线程解决智能指针的释放问题,并通过event进行同步。

构造一个示例来说明当前的融合Kernel不支持多输出。构造了2个对比网络。 ### 1. 中间结果不被外部引用 ```python x0 = builder.create_input(Float(32), [32, 32], "x0") x1 = builder.create_input(Float(32), [32, 32], "x1") y0 = builder.elementwise_add(x0, x1, axis=-1) y1 = builder.relu(y0) ``` 生成的CUDA Kernel如下: ```cpp __global__...