You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

test_all.py 28 kB

5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
5 years ago
support MindTricks in AutoPoly This commit introduces MindTrick support. Using so-called MindTricks, the ConstrainSchedule pass attempts to provide a good starting schedule. If the pass succeeds, it returns the new schedule and may also suggest to disable some subsequent passes. The set of disabled passes depends on the MindTrick. If the pass does not succeed, it returns its input schedule and none of the subsequent passes will be disabled. Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> fix DumpSchTreeToFile(): fix isl_schedule_get_ctx() typo SchedulePass: introduce fine-grain pass disabling tests/test_env.sh: take environment into account for AKG_DIR and AKG_BUILD_DIR poly/log_util: add logging helpers for poly poly/isl_util: add isl utilities MappingOuterBand::DoThreadMapping(): do not map swizzle dimensions PassMgrStrategy: provide RegisterConstrainedScheduling() GPUMgrStrategy: enable ConstrainSchedule DavinciMgrStrategy: enable ConstrainSchedule SchedulingMindTrick::BuildInfluencedSchedule(): build influenced schedule tests/operators/gpu/test_all.py: parse MindTrick CLI args tests/operators/gpu: add MindTrick support for 3 tests tests/st/ops/gpu: support MindTricks for test_fused_bn_update and test_relu_grad tests/st/ops/test_all.py: add test_mindtricks Signed-off-by: Harenome Ranaivoarivony-Razanajato <harenome.razanajato@huawei.com> SchedulingMindTrick: add pattern matching SchedulingMindTrick: support soft constraints Signed-off-by: Adilla Susungi <adilla.susungi@huawei.com> isl-influence.patch: add patch isl_influence: add header and code Signed-off-by: Javier de Juan <javier.de.juan@huawei.com> SharedMemoryManager: add shared_inversed_thread_map option SharedMemoryManager: add shared_vector_align option UserConfig: I/O options and switch for ConstrainSchedule test_composite_json.py: parse MindTrick CLI args Signed-off-by: Nelson Lossing <nelson.lossing@huawei.com> swizzle: add swizzle pass tests/operators/gpu: add .gitignore Signed-off-by: Baptiste Jarry <jarry.baptiste@huawei.com> gpu flags: ConstrainSchedule: create tempfile gpu flags: nvcc.py: support custom gpu flags Signed-off-by: Etienne Filhol <etienne.fihol@huawei.com>
5 years ago
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544
  1. #!/usr/bin/env python3
  2. # coding: utf-8
  3. # Copyright 2020-2021 Huawei Technologies Co., Ltd
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License
  16. from tests.common.test_utils import gen_random_shape
  17. from tests.operators.gpu.test_ms_add import test_ms_add
  18. from tests.operators.gpu.test_ms_addn import test_ms_addn
  19. from tests.operators.gpu.test_ms_batch_matmul import test_ms_bmm
  20. from tests.operators.gpu.test_ms_exp import test_ms_exp
  21. from tests.operators.gpu.test_ms_maximum import test_ms_maximum
  22. from tests.operators.gpu.test_ms_minimum import test_ms_minimum
  23. from tests.operators.gpu.test_ms_mul import test_ms_mul
  24. from tests.operators.gpu.test_ms_divide import test_ms_divide
  25. from tests.operators.gpu.test_ms_rsqrt import test_ms_rsqrt
  26. from tests.operators.gpu.test_ms_sub import test_ms_sub
  27. from tests.operators.gpu.test_ms_tile import test_ms_tile
  28. from tests.operators.gpu.test_ms_one_hot import test_ms_one_hot
  29. from tests.operators.gpu.test_ms_sqrt import test_ms_sqrt
  30. from tests.operators.gpu.test_ms_cast import test_ms_cast
  31. from tests.operators.gpu.test_ms_reshape import test_ms_reshape
  32. from tests.operators.gpu.test_ms_expand_dims import test_expand_dims
  33. from tests.operators.gpu.test_ms_trans_data import test_ms_trans_data
  34. from tests.operators.gpu.test_ms_log import test_ms_log
  35. from tests.operators.gpu.test_ms_pow import test_ms_pow
  36. from tests.operators.gpu.test_ms_reduce_sum import test_ms_reduce_sum
  37. from tests.operators.gpu.test_ms_abs import test_ms_abs
  38. from tests.operators.gpu.test_ms_neg import test_ms_neg
  39. from tests.operators.gpu.test_ms_round import test_ms_round
  40. from tests.operators.gpu.test_ms_select import test_ms_select
  41. from tests.operators.gpu.test_ms_equal import test_ms_equal
  42. from tests.operators.gpu.test_ms_less_equal import test_ms_less_equal
  43. from tests.operators.gpu.test_ms_greater_equal import test_ms_greater_equal
  44. from tests.operators.gpu.test_ms_reciprocal import test_ms_reciprocal
  45. from tests.operators.gpu.test_ms_reduce_max import test_ms_reduce_max
  46. from tests.operators.gpu.test_ms_reduce_min import test_ms_reduce_min
  47. from tests.operators.gpu.test_fused_pad import test_fused_pad
  48. from tests.operators.gpu.test_fused_bn_reduce import test_fused_bn_reduce
  49. from tests.operators.gpu.test_fused_bn_update import test_fused_bn_update
  50. from tests.operators.gpu.test_fused_bn_follow_relu import test_fused_bn_follow_relu
  51. from tests.operators.gpu.test_fused_bn_follow_relu_avgpool import test_fused_bn_follow_relu_avgpool
  52. from tests.operators.gpu.test_fused_bn_double_follow_relu import test_fused_bn_double_follow_relu
  53. from tests.operators.gpu.test_fused_bn_reduce_grad import test_fused_bn_reduce_grad
  54. from tests.operators.gpu.test_fused_relu_grad_bn_reduce_grad import test_fused_relu_grad_bn_reduce_grad
  55. from tests.operators.gpu.test_fused_relu_grad_bn_double_reduce_grad import test_fused_relu_grad_bn_double_reduce_grad
  56. from tests.operators.gpu.test_fused_l2loss_grad import test_fused_l2loss_grad
  57. from tests.operators.gpu.test_fused_is_finite import test_fused_is_finite
  58. from tests.operators.gpu.test_fused_relu_grad_bn_update_grad import test_fused_relu_grad_bn_update_grad
  59. from tests.operators.gpu.test_fused_relu_grad_bn_double_update_grad import test_fused_relu_grad_bn_double_update_grad
  60. from tests.operators.gpu.test_fused_relu_grad import test_fused_relu_grad
  61. from tests.operators.gpu.test_fused_bn_update_grad import test_fused_bn_update_grad
  62. from tests.operators.gpu.test_fused_mul_div_rsqrt_mul_isfinite_red import test_fused_mul_div_rsqrt_mul_isfinite_red
  63. def add(poly_sch, fuzz_shape=None, mind_trick_str=''):
  64. if fuzz_shape:
  65. test_ms_add(fuzz_shape, fuzz_shape, 'float32', poly_sch=poly_sch)
  66. return
  67. test_ms_add((1, 1024), (1, 1024), 'float32', poly_sch=poly_sch)
  68. test_ms_add((2, 32, 256, 32, 32), (2, 32, 256, 32, 32),
  69. 'float32', poly_sch=poly_sch)
  70. def addn(poly_sch, fuzz_shape=None, mind_trick_str=''):
  71. test_ms_addn((1, 1024, 1024), "float32", 2, poly_sch=poly_sch)
  72. test_ms_addn((1, 1024, 1024), "float16", 2, poly_sch=poly_sch)
  73. def bmm(poly_sch, fuzz_shape=None, mind_trick_str=''):
  74. test_ms_bmm((768, 768), (768, 768), 'float16', 'float16', layout1='NHDT', layout2='NHDT', layout_out='NHDT',
  75. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  76. dim="0 0 128 128 0 1 128 128 0 2 64 4", bind_block="6 6", bind_thread="32 4")
  77. test_ms_bmm((768, 768), (768, 768), 'float16', 'float16', layout1='NHTD', layout2='NHTD', layout_out='NHDT',
  78. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  79. dim="0 0 128 128 0 1 128 128 0 2 64 4", bind_block="6 6", bind_thread="32 8")
  80. test_ms_bmm((32, 12, 128, 128), (32, 12, 128, 64), 'float16', 'float16', layout1='NHDT', layout2='NHTD', layout_out='NHDT',
  81. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  82. dim="0 0 1 1 0 1 1 1 0 2 64 64 0 3 64 64 0 4 64 4", bind_block="12 32", bind_thread="32 4")
  83. test_ms_bmm((32, 12, 128, 64), (32, 12, 128, 64), 'float16', 'float16', layout1='NHDT', layout2='NHDT', layout_out='NHDT',
  84. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  85. dim="0 0 1 1 0 1 1 1 0 2 64 64 0 3 64 64 0 4 64 4", bind_block="12 32", bind_thread="32 4")
  86. """ Bert Batch64
  87. test_ms_bmm((8192, 768), (768, 768), 'float16', 'float16', layout1='NHDT', layout2='NHDT', layout_out='NHDT',
  88. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  89. dim="0 0 128 128 0 1 128 128 0 2 64 4", bind_block="6 64", bind_thread="32 4")
  90. test_ms_bmm((8192, 768), (8192, 768), 'float16', 'float16', layout1='NHTD', layout2='NHTD', layout_out='NHDT',
  91. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  92. dim="0 0 64 64 0 1 64 64 0 2 64 4", bind_block="12 12", bind_thread="32 4")
  93. test_ms_bmm((64, 12, 128, 128), (64, 12, 128, 64), 'float16', 'float16', layout1='NHDT', layout2='NHTD', layout_out='NHDT',
  94. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  95. dim="0 0 1 1 0 1 1 1 0 2 64 64 0 3 64 64 0 4 64 4", bind_block="12 64", bind_thread="32 4")
  96. test_ms_bmm((64, 12, 128, 64), (64, 12, 128, 64), 'float16', 'float16', layout1='NHDT', layout2='NHDT', layout_out='NHDT',
  97. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  98. dim="0 0 1 1 0 1 1 1 0 2 64 64 0 1 128 128 0 2 64 4", bind_block="2 12 64", bind_thread="32 4")
  99. test_ms_bmm((8192, 768), (8192, 3072), 'float16', 'float16', layout1='NHTD', layout2='NHTD', layout_out='NHDT',
  100. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  101. dim="0 0 128 128 0 1 128 128 0 2 64 4", bind_block="24 6", bind_thread="32 8")
  102. test_ms_bmm((8192, 3072), (8192, 768), 'float16', 'float16', layout1='NHTD', layout2='NHTD', layout_out='NHDT',
  103. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  104. dim="0 0 128 128 0 1 128 128 0 2 64 4", bind_block="6 24", bind_thread="32 8")
  105. test_ms_bmm((8192, 768), (3072, 768), 'float16', 'float16', layout1='NHDT', layout2='NHDT', layout_out='NHDT',
  106. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  107. dim="0 0 128 128 0 1 128 128 0 2 64 4", bind_block="24 64", bind_thread="32 4")
  108. test_ms_bmm((8192, 3072), (768, 3072), 'float16', 'float16', layout1='NHDT', layout2='NHDT', layout_out='NHDT',
  109. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  110. dim="0 0 128 128 0 1 128 128 0 2 64 4", bind_block="6 64", bind_thread="32 8")
  111. test_ms_bmm((8192, 3072), (3072, 768), 'float16', 'float16', layout1='NHDT', layout2='NHTD', layout_out='NHDT',
  112. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  113. dim="0 0 128 128 0 1 128 128 0 2 64 4", bind_block="6 64", bind_thread="32 8")
  114. test_ms_bmm((8192, 768), (768, 3072), 'float16', 'float16', layout1='NHDT', layout2='NHTD', layout_out='NHDT',
  115. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  116. dim="0 0 128 128 0 1 128 128 0 2 64 4", bind_block="24 64", bind_thread="32 4")
  117. """
  118. """ Bert Batch32
  119. test_ms_bmm((4096, 768), (768, 768), 'float16', 'float16', layout1='NHDT', layout2='NHDT', layout_out='NHDT',
  120. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  121. dim="0 0 128 128 0 1 128 128 0 2 64 4", bind_block="6 32", bind_thread="32 4")
  122. test_ms_bmm((32, 12, 128, 128), (32, 12, 128, 64), 'float16', 'float16', layout1='NHDT', layout2='NHTD', layout_out='NHDT',
  123. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  124. dim="0 0 1 1 0 1 1 1 0 2 64 64 0 3 64 64 0 4 64 4", bind_block="12 32", bind_thread="32 4")
  125. test_ms_bmm((4096, 768), (4096, 768), 'float16', 'float16', layout1='NHTD', layout2='NHTD', layout_out='NHDT',
  126. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  127. dim="0 0 128 128 0 1 128 128 0 2 64 4", bind_block="6 6", bind_thread="32 4")
  128. test_ms_bmm((32, 12, 128, 64), (32, 12, 128, 64), 'float16', 'float16', layout1='NHDT', layout2='NHDT', layout_out='NHDT',
  129. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  130. dim="0 0 1 1 0 1 1 1 0 2 32 32 0 3 64 64 0 4 32 4", bind_block="12 32", bind_thread="32 4")
  131. test_ms_bmm((4096, 768), (4096, 3072), 'float16', 'float16', layout1='NHTD', layout2='NHTD', layout_out='NHDT',
  132. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  133. dim="0 0 128 128 0 1 128 128 0 2 64 4", bind_block="24 6", bind_thread="32 8")
  134. test_ms_bmm((4096, 3072), (768, 3072), 'float16', 'float16', layout1='NHDT', layout2='NHDT', layout_out='NHDT',
  135. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  136. dim="0 0 128 128 0 1 128 128 0 2 64 4", bind_block="6 32", bind_thread="32 8")
  137. test_ms_bmm((4096, 3072), (4096, 768), 'float16', 'float16', layout1='NHTD', layout2='NHTD', layout_out='NHDT',
  138. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  139. dim="0 0 128 128 0 1 128 128 0 2 64 4", bind_block="6 24", bind_thread="32 8")
  140. test_ms_bmm((4096, 3072), (3072, 768), 'float16', 'float16', layout1='NHDT', layout2='NHTD', layout_out='NHDT',
  141. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  142. dim="0 0 128 128 0 1 128 128 0 2 64 4", bind_block="6 32", bind_thread="32 4")
  143. test_ms_bmm((4096, 768), (3072, 768), 'float16', 'float16', layout1='NHDT', layout2='NHDT', layout_out='NHDT',
  144. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  145. dim="0 0 128 128 0 1 128 128 0 2 64 4", bind_block="24 32", bind_thread="32 4")
  146. test_ms_bmm((4096, 768), (768, 3072), 'float16', 'float16', layout1='NHDT', layout2='NHTD', layout_out='NHDT',
  147. shape_bias=(1, ), add_bias=False, tensor_core=True, poly_sch=poly_sch,
  148. dim="0 0 128 128 0 1 128 128 0 2 64 4", bind_block="24 32", bind_thread="32 4")
  149. """
  150. def cast(poly_sch, fuzz_shape=None, mind_trick_str=''):
  151. test_ms_cast((32, 32, 14, 14, 16), "float16", "float32", poly_sch=poly_sch)
  152. test_ms_cast((32, 32, 14, 14, 16), "float32", "float16", poly_sch=poly_sch)
  153. def exp(poly_sch, fuzz_shape=None, mind_trick_str=''):
  154. test_ms_exp((1024, 4096), 'float32', poly_sch=poly_sch)
  155. test_ms_exp((1024, 4096), 'float16', poly_sch=poly_sch)
  156. test_ms_exp((1024, 4095), 'float16', poly_sch=poly_sch)
  157. test_ms_exp((1024, 799), 'float16', poly_sch=poly_sch)
  158. def maximum(poly_sch, fuzz_shape=None, mind_trick_str=''):
  159. test_ms_maximum((32, 1024, 1024), (32, 1024, 1024),
  160. 'float32', poly_sch=poly_sch)
  161. test_ms_maximum((32, 1024, 1024), (1, 1024, 1024),
  162. 'float16', poly_sch=poly_sch)
  163. test_ms_maximum((32, 32, 32, 256), (32, 32, 1, 256),
  164. 'float16', poly_sch=poly_sch)
  165. def minimum(poly_sch, fuzz_shape=None, mind_trick_str=''):
  166. test_ms_minimum((32, 1024, 1024), (32, 1024, 1024),
  167. 'float32', poly_sch=poly_sch)
  168. test_ms_minimum((32, 1024, 1024), (1, 1024, 1024),
  169. 'float16', poly_sch=poly_sch)
  170. test_ms_minimum((32, 32, 32, 256), (32, 32, 1, 256),
  171. 'float16', poly_sch=poly_sch)
  172. def mul(poly_sch, fuzz_shape=None, mind_trick_str=''):
  173. test_ms_mul((1024, 4096), 'float32', poly_sch=poly_sch)
  174. def divide(poly_sch, fuzz_shape=None, mind_trick_str=''):
  175. test_ms_divide((1024, 1024), 'float32', poly_sch=poly_sch)
  176. test_ms_divide((1024, 1024), 'float16', poly_sch=poly_sch)
  177. def reshape(poly_sch, fuzz_shape=None, mind_trick_str=''):
  178. test_ms_reshape("float32", (64, 128, 1024),
  179. (8192, 1024), poly_sch=poly_sch)
  180. test_ms_reshape("float16", (64, 128, 1024),
  181. (8192, 1024), poly_sch=poly_sch)
  182. def rsqrt(poly_sch, fuzz_shape=None, mind_trick_str=''):
  183. test_ms_rsqrt((32, 1024, 1024), 'float32', poly_sch=poly_sch)
  184. test_ms_rsqrt((32, 1024, 1024), 'float16', poly_sch=poly_sch)
  185. def sqrt(poly_sch, fuzz_shape=None, mind_trick_str=''):
  186. test_ms_sqrt((1024, 1024), "float32", poly_sch=poly_sch)
  187. test_ms_sqrt((1024, 1024), "float16", poly_sch=poly_sch)
  188. def sub(poly_sch, fuzz_shape=None, mind_trick_str=''):
  189. test_ms_sub((32, 1024, 1024), (32, 1024, 1024),
  190. 'float32', poly_sch=poly_sch)
  191. test_ms_sub((32, 1024, 1024), (32, 1024, 1024),
  192. 'float16', poly_sch=poly_sch)
  193. test_ms_sub((32, 1024, 1024), (1, 1024, 1024),
  194. 'float32', poly_sch=poly_sch)
  195. test_ms_sub((4, 4, 4), (1, 4, 4), 'float32', poly_sch=poly_sch)
  196. def tile(poly_sch, fuzz_shape=None, mind_trick_str=''):
  197. test_ms_tile((1024, 4096), (3,), 'float32', poly_sch=poly_sch)
  198. test_ms_tile((1024, 4096), (3,), 'float16', poly_sch=poly_sch)
  199. def one_hot(poly_sch, fuzz_shape=None, mind_trick_str=''):
  200. test_ms_one_hot((1024,), 16, "int32", 1, 0, 0, poly_sch=poly_sch)
  201. test_ms_one_hot((1024,), 16, "float32", 1, 0, 0, poly_sch=poly_sch)
  202. test_ms_one_hot((32,), 16, "int32", 1, 0, 0, poly_sch=poly_sch)
  203. test_ms_one_hot((32,), 16, "float32", 1, 0, 0, poly_sch=poly_sch)
  204. def expand_dims(poly_sch, fuzz_shape=None, mind_trick_str=''):
  205. test_expand_dims((32, 1024, 1024), 1, 'float32', poly_sch=poly_sch)
  206. test_expand_dims((32, 1024, 1024), 2, 'float16', poly_sch=poly_sch)
  207. def trans_data(poly_sch, fuzz_shape=None, mind_trick_str=''):
  208. test_ms_trans_data((8, 24, 38, 38), (0, 2, 1, 3),
  209. 'float32', poly_sch=poly_sch)
  210. test_ms_trans_data((8, 24, 38, 38), (0, 2, 1, 3),
  211. 'float16', poly_sch=poly_sch)
  212. def log(poly_sch, fuzz_shape=None, mind_trick_str=''):
  213. test_ms_log((9, 1024, 1024), 'float16', poly_sch=poly_sch)
  214. test_ms_log((9, 1024, 1024), 'float32', poly_sch=poly_sch)
  215. def pow(poly_sch, fuzz_shape=None, mind_trick_str=''):
  216. test_ms_pow((9, 1024, 1024), (9, 1024, 1024), 'float32', poly_sch=poly_sch)
  217. test_ms_pow((9, 1024, 1024), (9, 1024, 1), 'float32', poly_sch=poly_sch)
  218. test_ms_pow((9, 1024, 1024), (9, 1, 1), 'float32', poly_sch=poly_sch)
  219. test_ms_pow((9, 1024, 1024), (1, 1, 1), 'float32', poly_sch=poly_sch)
  220. test_ms_pow((9, 1024, 1024), (9, 1024, 1024), 'float16', poly_sch=poly_sch)
  221. test_ms_pow((9, 1024, 1024), (9, 1024, 1), 'float16', poly_sch=poly_sch)
  222. test_ms_pow((9, 1024, 1024), (9, 1, 1), 'float16', poly_sch=poly_sch)
  223. test_ms_pow((9, 1024, 1024), (1, 1, 1), 'float16', poly_sch=poly_sch)
  224. def abs(poly_sch, fuzz_shape=None, mind_trick_str=''):
  225. test_ms_abs((1024, 1024), "float32", poly_sch=poly_sch)
  226. test_ms_abs((1024, 1024), "float16", poly_sch=poly_sch)
  227. test_ms_abs((1, ), "float32", poly_sch=poly_sch)
  228. test_ms_abs((1, 1), "float32", poly_sch=poly_sch)
  229. test_ms_abs((1, ), "float16", poly_sch=poly_sch)
  230. test_ms_abs((1, 1), "float16", poly_sch=poly_sch)
  231. def neg(poly_sch, fuzz_shape=None, mind_trick_str=''):
  232. test_ms_neg((1024, 1024), "float32", poly_sch=poly_sch)
  233. test_ms_neg((1024, 1024), "float16", poly_sch=poly_sch)
  234. test_ms_neg((1, ), "float32", poly_sch=poly_sch)
  235. test_ms_neg((1, 1), "float32", poly_sch=poly_sch)
  236. test_ms_neg((1, ), "float16", poly_sch=poly_sch)
  237. test_ms_neg((1, 1), "float16", poly_sch=poly_sch)
  238. def round(poly_sch, fuzz_shape=None, mind_trick_str=''):
  239. test_ms_round((1024, 1024), "float32", poly_sch=poly_sch)
  240. test_ms_round((1024, 1024), "float16", poly_sch=poly_sch)
  241. test_ms_round((1, ), "float32", poly_sch=poly_sch)
  242. test_ms_round((1, 1), "float32", poly_sch=poly_sch)
  243. test_ms_round((1, ), "float16", poly_sch=poly_sch)
  244. test_ms_round((1, 1), "float16", poly_sch=poly_sch)
  245. def reduce_sum(poly_sch, fuzz_shape=None, mind_trick_str=''):
  246. test_ms_reduce_sum((256, 256), 'float32', axis=(1,),
  247. keepdims=True, poly_sch=poly_sch)
  248. test_ms_reduce_sum((9, 1024, 1024), 'float32', axis=None,
  249. keepdims=False, poly_sch=poly_sch)
  250. test_ms_reduce_sum((9, 1024, 1024), 'float32', axis=2,
  251. keepdims=True, poly_sch=poly_sch)
  252. test_ms_reduce_sum((9, 1024), 'float16', axis=None,
  253. keepdims=False, poly_sch=poly_sch)
  254. test_ms_reduce_sum((9, 1024), 'float16', axis=1,
  255. keepdims=True, poly_sch=poly_sch)
  256. def select(poly_sch, fuzz_shape=None, mind_trick_str=''):
  257. test_ms_select((2, ), (2, 2, 2), "int8", "float16", poly_sch=poly_sch)
  258. def equal(poly_sch, fuzz_shape=None, mind_trick_str=''):
  259. test_ms_equal(((1, 1024), (1, 1024)), 'float16', poly_sch=poly_sch)
  260. test_ms_equal(((1, 1024), (1, 1024)), 'float32', poly_sch=poly_sch)
  261. def less_equal(poly_sch, fuzz_shape=None, mind_trick_str=''):
  262. test_ms_less_equal((1, 1024), (1, 1024), 'float16', poly_sch=poly_sch)
  263. test_ms_less_equal((1, 1024), (1, 1024), 'float32', poly_sch=poly_sch)
  264. def greater_equal(poly_sch, fuzz_shape=None, mind_trick_str=''):
  265. test_ms_greater_equal((1, 1024), (1, 1024), 'float16', poly_sch=poly_sch)
  266. test_ms_greater_equal((1, 1024), (1, 1024), 'float32', poly_sch=poly_sch)
  267. def reciprocal(poly_sch, fuzz_shape=None, mind_trick_str=''):
  268. test_ms_reciprocal((1, 1024), 'float16', poly_sch=poly_sch)
  269. test_ms_reciprocal((1, 1024), 'float32', poly_sch=poly_sch)
  270. def reduce_min(poly_sch, fuzz_shape=None, mind_trick_str=''):
  271. test_ms_reduce_min((9, 1024, 1024), 'float32', axis=None,
  272. keepdims=False, poly_sch=poly_sch)
  273. test_ms_reduce_min((9, 1024, 1024), 'float16', axis=None,
  274. keepdims=False, poly_sch=poly_sch)
  275. test_ms_reduce_min((9, 1024, 1024), 'float32', axis=2,
  276. keepdims=False, poly_sch=poly_sch)
  277. test_ms_reduce_min((9, 1024, 1024), 'float16', axis=2,
  278. keepdims=False, poly_sch=poly_sch)
  279. def reduce_max(poly_sch, fuzz_shape=None, mind_trick_str=''):
  280. test_ms_reduce_max((9, 1024, 1024), 'float32', axis=None,
  281. keepdims=False, poly_sch=poly_sch)
  282. test_ms_reduce_max((9, 1024, 1024), 'float16', axis=None,
  283. keepdims=False, poly_sch=poly_sch)
  284. test_ms_reduce_max((9, 1024, 1024), 'float32', axis=2,
  285. keepdims=False, poly_sch=poly_sch)
  286. test_ms_reduce_max((9, 1024, 1024), 'float16', axis=2,
  287. keepdims=False, poly_sch=poly_sch)
  288. def fused_pad(poly_sch, fuzz_shape=None, mind_trick_str=''):
  289. test_fused_pad((7, 7, 3, 64), (0, 0, 0, 0), (0, 0, 1, 0),
  290. layout='NHWC', pad_value=0.0, poly_sch=poly_sch)
  291. def fused_bn_reduce(poly_sch, fuzz_shape=None, mind_trick_str=''):
  292. test_fused_bn_reduce((256, 7, 7, 2048), layout='NHWC', poly_sch=poly_sch)
  293. def fused_bn_update(poly_sch, fuzz_shape=None, mind_trick_str=''):
  294. test_fused_bn_update((2048,), poly_sch=poly_sch, mind_trick=mind_trick_str)
  295. def fused_bn_follow_relu(poly_sch, fuzz_shape=None, mind_trick_str=''):
  296. test_fused_bn_follow_relu(
  297. (256, 7, 7, 2048), layout='NHWC', poly_sch=poly_sch)
  298. def fused_bn_follow_relu_avgpool(poly_sch, fuzz_shape=None, mind_trick_str=''):
  299. test_fused_bn_follow_relu_avgpool(
  300. (256, 7, 7, 2048), layout='NHWC', poly_sch=poly_sch)
  301. def fused_bn_double_follow_relu(poly_sch, fuzz_shape=None, mind_trick_str=''):
  302. test_fused_bn_double_follow_relu(
  303. (256, 7, 7, 2048), layout='NHWC', poly_sch=poly_sch)
  304. def fused_bn_reduce_grad(poly_sch, fuzz_shape=None, mind_trick_str=''):
  305. test_fused_bn_reduce_grad(
  306. (256, 56, 56, 256), layout='NHWC', poly_sch=poly_sch)
  307. def fused_relu_grad_bn_reduce_grad(poly_sch, fuzz_shape=None, mind_trick_str=''):
  308. test_fused_relu_grad_bn_reduce_grad(
  309. (64, ), (256, 112, 112, 64), layout='NHWC', poly_sch=poly_sch)
  310. def fused_relu_grad_bn_double_reduce_grad(poly_sch, fuzz_shape=None, mind_trick_str=''):
  311. test_fused_relu_grad_bn_double_reduce_grad(
  312. (256,), (256, 56, 56, 256), layout="NHWC", poly_sch=poly_sch)
  313. def fused_l2loss_grad(poly_sch, fuzz_shape=None, mind_trick_str=''):
  314. test_fused_l2loss_grad((1, 1, 256, 1024), layout='NHWC', poly_sch=poly_sch, mind_trick=mind_trick_str)
  315. def fused_is_finite(poly_sch, fuzz_shape=None, mind_trick_str=''):
  316. test_fused_is_finite((1, 1, 256, 1024), layout='NHWC', poly_sch=poly_sch)
  317. def fused_relu_grad_bn_update_grad(poly_sch, fuzz_shape=None, mind_trick_str=''):
  318. test_fused_relu_grad_bn_update_grad(
  319. (256, 112, 112, 64), (64,), layout="NHWC", poly_sch=poly_sch)
  320. def fused_relu_grad_bn_double_update_grad(poly_sch, fuzz_shape=None, mind_trick_str=''):
  321. test_fused_relu_grad_bn_double_update_grad(
  322. (256, 56, 56, 256), (256, ), layout='NHWC', poly_sch=poly_sch)
  323. def fused_relu_grad(poly_sch, fuzz_shape=None, mind_trick_str=''):
  324. test_fused_relu_grad((256, 56, 56, 256), poly_sch=poly_sch, mind_trick=mind_trick_str)
  325. def fused_bn_update_grad(poly_sch, fuzz_shape=None, mind_trick_str=''):
  326. test_fused_bn_update_grad(
  327. (256, 56, 56, 256), (256,), layout="NHWC", poly_sch=poly_sch)
  328. def fused_mul_div_rsqrt_mul_isfinite_red(poly_sch, fuzz_shape=None, mind_trick_str=''):
  329. test_fused_mul_div_rsqrt_mul_isfinite_red((64,), poly_sch=poly_sch)
  330. class Logger(object):
  331. def __init__(self, filename, stream):
  332. self.terminal = stream
  333. self.log = open(filename, 'a')
  334. def write(self, message):
  335. self.terminal.write(message)
  336. self.log.write(message)
  337. def flush(self):
  338. pass
  339. def usage(op_map):
  340. print("Usage:")
  341. print("1. Run func1 and func2 with manual schedule:")
  342. print("\t$python test_all.py -m func_name1 func_name2")
  343. print("\t$python test_all.py --manual func_name1 func_name2")
  344. print("2. Run all with auto schedule:")
  345. print("\t$python test_all.py -a all\n")
  346. print("\t$python test_all.py --auto all\n")
  347. print("3. Both schedule methods will be tested if no option is specified")
  348. print("\t$python test_all.py func_name")
  349. print("4. Run fuzz test of add op with maximal dimension of shape equals 3")
  350. print("\t$python test_all.py -f 3 add")
  351. print("Available func:")
  352. print("\t", list(op_map.keys()), "\n")
  353. if __name__ == '__main__':
  354. import sys
  355. import getopt
  356. import traceback
  357. from datetime import datetime
  358. op_map = {"abs": abs, "add": add, "addn": addn, "bmm": bmm, "cast": cast, "divide": divide,
  359. "equal": equal, "exp": exp, "greater_equal": greater_equal, "less_equal": less_equal,
  360. "log": log, "max": maximum, "min": minimum, "mul": mul, "neg": neg, "pow": pow,
  361. "reciprocal": reciprocal, "round": round, "rsqrt": rsqrt, "select": select, "sqrt": sqrt,
  362. "sub": sub, "reduce_max": reduce_max, "reduce_min": reduce_min,
  363. "reduce_sum": reduce_sum, "expand_dims": expand_dims, "one_hot": one_hot,
  364. "reshape": reshape, "tile": tile, "trans_data": trans_data,
  365. "fused_pad": fused_pad,
  366. "fused_bn_reduce": fused_bn_reduce,
  367. "fused_bn_update": fused_bn_update,
  368. "fused_bn_follow_relu": fused_bn_follow_relu,
  369. "fused_bn_follow_relu_avgpool": fused_bn_follow_relu_avgpool,
  370. "fused_bn_double_follow_relu": fused_bn_double_follow_relu,
  371. "fused_bn_reduce_grad": fused_bn_reduce_grad,
  372. "fused_relu_grad_bn_reduce_grad": fused_relu_grad_bn_reduce_grad,
  373. "fused_relu_grad_bn_double_reduce_grad": fused_relu_grad_bn_double_reduce_grad,
  374. "fused_l2loss_grad": fused_l2loss_grad,
  375. "fused_is_finite": fused_is_finite,
  376. "fused_relu_grad_bn_update_grad": fused_relu_grad_bn_update_grad,
  377. "fused_relu_grad_bn_double_update_grad": fused_relu_grad_bn_double_update_grad,
  378. "fused_relu_grad": fused_relu_grad,
  379. "fused_bn_update_grad": fused_bn_update_grad,
  380. "fused_mul_div_rsqrt_mul_isfinite_red": fused_mul_div_rsqrt_mul_isfinite_red
  381. }
  382. all_f = list(op_map.values())
  383. op_map["all"] = all_f
  384. if len(sys.argv) == 1:
  385. usage(op_map)
  386. sys.exit()
  387. options, args = getopt.getopt(
  388. sys.argv[1:], "f:", ["fuzz=", "mind-trick-string=", "mind-trick-file="])
  389. mind_trick_str = ''
  390. fuzz_dim = 0
  391. for name, value in options:
  392. if name in ("-f", "--fuzz"):
  393. fuzz_dim = int(value)
  394. if name == "--mind-trick-string":
  395. mind_trick_str = value
  396. if name == "--mind-trick-file":
  397. with open(value, 'r') as f:
  398. mind_trick_str = f.read()
  399. fail_op_list = dict()
  400. run_op_list = list()
  401. for op in args:
  402. if op_map.get(op) is not None:
  403. f = op_map.get(op)
  404. if not isinstance(f, list):
  405. run_op_list.append(f)
  406. else:
  407. run_op_list += f
  408. now = datetime.now()
  409. filename = "opstest_" + \
  410. '-'.join(list(map(str, [now.month, now.day,
  411. now.hour, now.minute]))) + ".log"
  412. sys.stdout = Logger(filename, sys.stdout)
  413. sys.stderr = Logger(filename, sys.stderr)
  414. for op in run_op_list:
  415. print("Operater: ", op.__name__)
  416. fuzz_shape = gen_random_shape(fuzz_dim) if fuzz_dim > 0 else None
  417. if fuzz_shape:
  418. print("Fuzz shape: {}".format(fuzz_shape))
  419. try:
  420. print("Time of auto schedule:")
  421. op(poly_sch=True, fuzz_shape=fuzz_shape, mind_trick_str=mind_trick_str)
  422. except:
  423. if op.__name__ in fail_op_list:
  424. fail_op_list[op.__name__].extend(
  425. ["using auto schedule:", traceback.format_exc()])
  426. else:
  427. fail_op_list[op.__name__] = [
  428. "using auto schedule:", traceback.format_exc()]
  429. if len(fail_op_list) == 0:
  430. print("All test pass!")
  431. else:
  432. for op, error_info in fail_op_list.items():
  433. print("Run op %s error" % op)
  434. for e in error_info:
  435. print(e)