使用曙光算力的时候用的是异构卡,开始出现了警告Launch params (1024, 1, 1) are larger than launch bounds (256) for kernel ZN6jittorL10slice_funcEiiiPfS0_iiS0 please add launch_bounds to kernel define or use --gpu-max-threads-per-block recompile program !
然后设置os.environ[“JT_CUDA_EXTRA_FLAGS”] = "–gpu-max-threads-per-block=256"没效果就看了一下型号要用rocm,但是jt.flags.use_rocm = 1出现了报错:
RuntimeError: Wrong inputs arguments, Please refer to examples(help(jt.Flags.use_rocm)).
Types of your inputs are:
self = Flags,
arg = int,
The function declarations are:
void _set_use_cuda(int v)
void _set_use_cuda(bool v)
Failed reason:[f 0624 21:43:01.740056 88 parallel_compiler.cc:333] Error happend during compilation: [Error] source file locatio[n:/root/.cache/jittor/jt1.3.9/g](file:///N:/root/.cache/jittor/jt1.3.9/g)++11.4.0/py3.10.16/Linux-3.10.0-9x26/HygonC86718532x37/31bc/master/jit/__opkey0_array__T_int32__o_1__opkey1_broadcast_to__Tx_int32__DIM_4__BCAST_f__opkey2_binary___hash_c712642a5fd92643_op.cc Compile fused operator(0/1)failed:[Op(43:0:1:1:i0:o1:s0:g1,array->44),Op(47:0:1:1:i1:o1:s0:g1,broadcast_to->48),Op(49:1:1:1:i2:o1:s0:g1,binary.add->50),] Reason: [f 0624 21:43:01.739764 88 op_compiler.cc:764] Check failed: file_exist((src_path)) Something wrong… Could you please report this issue? /root/.cache/jittor/jt1.3.9/g++11.4.0/py3.10.16/Linux-3.10.0-9x26/HygonC86718532x37/31bc/master/rocm_jittor/src/ops/array_op.cc
然后我看源码里use_cuda和use_rocm的注释也一样:
use_cuda: int | |
---|---|
‘’‘Use cuda or not. 1 for trying to use cuda, 2 for forcing to use cuda. Default: 0’‘’ | |
use_rocm: int | |
— | — |
‘’‘Use cuda or not. 1 for trying to use cuda, 2 for forcing to use cuda. Default: 0’‘’ |
直接设置jt.flags.use_cuda = 1也没有报错但是开始的线程警告解决不了,加速卡使用率也抖动的特别厉害,平均速度大概比在V100上慢了两倍多